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

Fix #892 by improving test code #918

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Fix #892 by improving test code #918

merged 1 commit into from
Jun 15, 2023

Conversation

vgnshiyer
Copy link
Contributor

(Describe the goal of this PR. Mention any related Issue numbers)

Fixes #892

This PR handles the exception when asyncio fails to get event loop from the main thread when the codecov CI job is run. Current changes tries to get an event loop, else it creates a new one and returns it.

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch changed the title fix: handled runtime exception for event loop not being in MainThread Fix #892 by improving test code Jun 15, 2023
@seratch seratch added this to the 1.18.1 milestone Jun 15, 2023
@seratch seratch self-assigned this Jun 15, 2023
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #918 (e7953e8) into main (f8c1b86) will increase coverage by 0.03%.
The diff coverage is 96.96%.

@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
+ Coverage   91.74%   91.77%   +0.03%     
==========================================
  Files         181      181              
  Lines        6285     6309      +24     
==========================================
+ Hits         5766     5790      +24     
  Misses        519      519              
Impacted Files Coverage Δ
slack_bolt/app/async_app.py 94.16% <90.00%> (+0.08%) ⬆️
slack_bolt/app/app.py 87.44% <100.00%> (+0.16%) ⬆️
slack_bolt/authorization/authorize_result.py 95.12% <100.00%> (+1.18%) ⬆️
slack_bolt/context/respond/async_respond.py 92.59% <100.00%> (ø)
slack_bolt/context/respond/internals.py 100.00% <100.00%> (ø)
slack_bolt/context/respond/respond.py 92.59% <100.00%> (ø)
slack_bolt/error/__init__.py 100.00% <100.00%> (ø)
slack_bolt/version.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you 🙇

@seratch seratch merged commit 3e5f012 into slackapi:main Jun 15, 2023
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.

Codecov CI job for this project hangs
2 participants