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: improve flaky tests #1615

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

WilliamBergamin
Copy link
Contributor

@WilliamBergamin WilliamBergamin commented Dec 13, 2024

Summary

This PR aims to improve flaky tests in our CI pipeline and consolidate the mock socket mode clients found in this project

Testing

Ran the Ci pipeline a few times did not observe any flaking tests

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • 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 python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.01%. Comparing base (5c57a32) to head (1ef964c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1615      +/-   ##
==========================================
+ Coverage   84.89%   85.01%   +0.11%     
==========================================
  Files         113      113              
  Lines       12639    12639              
==========================================
+ Hits        10730    10745      +15     
+ Misses       1909     1894      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WilliamBergamin WilliamBergamin marked this pull request as ready for review December 13, 2024 20:02
# running Task gets suspended, and the event loop executes the next Task.
# To schedule a callback from another OS thread, the loop.call_soon_threadsafe() method should be used.
# https://docs.python.org/3/library/asyncio-dev.html#asyncio-multithreading
test.loop.call_soon_threadsafe(test.loop.stop)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this line is creating more stability; taken from bolt-python

@seratch seratch added this to the 3.33.6 milestone Dec 13, 2024
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.

Thank you! This is AMAZING

@seratch seratch merged commit 580eaab into slackapi:main Dec 13, 2024
12 checks passed
@WilliamBergamin WilliamBergamin deleted the imporve-flaky-test branch December 16, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants