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: flaky test_explore_json_async test v2 #26106

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

villebro
Copy link
Member

SUMMARY

#26059 relaxed the assertion in test_explore_json_async to not fail if the result was already cached. However, since the response payload is different for the 202 response, the test still fails if a 200 is received. This PR changes the assertion from the legacy self.assert notation to the preferred assert one, and makes the keys assertion both conditional on a 202 response, and explicitly asserts the returned keys, instead of the key count.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4fc2758) 69.10% compared to head (3bcc183) 58.93%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #26106       +/-   ##
===========================================
- Coverage   69.10%   58.93%   -10.18%     
===========================================
  Files        1940     1940               
  Lines       75869    75869               
  Branches     8445     8445               
===========================================
- Hits        52427    44710     -7717     
- Misses      21267    28984     +7717     
  Partials     2175     2175               
Flag Coverage Δ
hive 53.68% <ø> (ø)
mysql ?
postgres ?
presto 53.63% <ø> (ø)
python 61.79% <ø> (-21.16%) ⬇️
sqlite ?
unit 55.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the improvement!

@michael-s-molina michael-s-molina merged commit 91a8b69 into apache:master Nov 28, 2023
31 checks passed
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Nov 28, 2023
self.assertCountEqual(
keys, ["channel_id", "job_id", "user_id", "status", "errors", "result_url"]
)
assert rv.status_code in {200, 202}
Copy link
Member

Choose a reason for hiding this comment

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

@villebro I was wondering whether it would be easier/simpler to disable the caching for this test so the response status code is always 200. The only caveat is whether we should be testing both scenarios.

Copy link
Member Author

Choose a reason for hiding this comment

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

@john-bodley yeah, totally. I tried to do that a long time ago, but things got really weird. I figured I'll rewrite this test when we start preparing for GAQ for real.

michael-s-molina pushed a commit that referenced this pull request Dec 4, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants