Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add python runtime tests #1748

Merged
merged 14 commits into from
Mar 27, 2024
Merged

chore: add python runtime tests #1748

merged 14 commits into from
Mar 27, 2024

Conversation

AkhilJ321
Copy link
Contributor

@AkhilJ321 AkhilJ321 commented Jan 16, 2024

Description

Added runtime tests for python

Related Issue

Fixes #1745

Copy link

netlify bot commented Jan 16, 2024

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit c7b6996
🔍 Latest deploy log https://app.netlify.com/sites/modelina/deploys/660426cc96f7080008dee9d6

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

@AkhilJ321 AkhilJ321 marked this pull request as ready for review January 17, 2024 17:07
@AkhilJ321
Copy link
Contributor Author

@jonaslagoni , can you review this PR

@jonaslagoni jonaslagoni changed the title chore: added python runtime tests chore: add python runtime tests Jan 17, 2024
@coveralls
Copy link

coveralls commented Jan 17, 2024

Pull Request Test Coverage Report for Build 8453039650

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.303%

Totals Coverage Status
Change from base Build 8323576283: 0.0%
Covered Lines: 5994
Relevant Lines: 6325

💛 - Coveralls

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's focus on making the workflow succeed 🙂

test/runtime/runtime-python.ts Outdated Show resolved Hide resolved
.github/workflows/runtime-python-testing.yml Outdated Show resolved Hide resolved
@AkhilJ321
Copy link
Contributor Author

@jonaslagoni , thank you for the reviews, added new changes

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there it seems 👍

test/runtime/runtime-python/test/main.py Outdated Show resolved Hide resolved
test/runtime/runtime-python.ts Outdated Show resolved Hide resolved
test/runtime/runtime-python/test/main.py Outdated Show resolved Hide resolved
test/runtime/runtime-python.spec.ts Outdated Show resolved Hide resolved
@jonaslagoni
Copy link
Member

@AkhilJ321 have you had time to take a look at the problem above?

@AkhilJ321
Copy link
Contributor Author

@AkhilJ321 have you had time to take a look at the problem above?

yes, tried debugging it in execCommand code also, guess its some issue with the way Python tests give output.
will try to get a proper solution for this soon.

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After manually running your test command, you should be able to get the exit code from the command using echo $? to check whether it is a problem i.e. that it returns 1 when tests are successful.

@jonaslagoni
Copy link
Member

It also slightly looks like that there is an exception thrown that the test ignores (based on the CI logs)

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@jonaslagoni
Copy link
Member

@AkhilJ321 have you giving up on the effort here?

@AkhilJ321
Copy link
Contributor Author

AkhilJ321 commented Mar 27, 2024

@AkhilJ321 have you given up on the effort here?

Sorry for not reaching out to you. There is thing I am confused about:

  1. Currently I have these two tests do I need some other tests also :
    image

@AkhilJ321
Copy link
Contributor Author

After manually running your test command, you should be able to get the exit code from the command using echo $? to check whether it is a problem i.e. that it returns 1 when tests are successful.

It returns 0 on successful execution

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@AkhilJ321
Copy link
Contributor Author

After manually running your test command, you should be able to get the exit code from the command using echo $? to check whether it is a problem i.e. that it returns 1 when tests are successful.

It returns 0 on successful execution.
But python tests also return some information even on successful execution which is coming in stderr. so I made allowStdError =true.
So now this thing is resolved.

@jonaslagoni
Copy link
Member

Awesome @AkhilJ321 ✌️

@jonaslagoni jonaslagoni merged commit fe88516 into asyncapi:master Mar 27, 2024
17 checks passed
@jonaslagoni
Copy link
Member

@all-contributors please add @AkhilJ321 for code, test

Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @AkhilJ321! 🎉

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 3.4.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 4.0.0-next.36 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add runtime tests for Python
4 participants