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 for charts changed on #19483

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Apr 1, 2022

SUMMARY

There is a flaky test for charts changed on the case. This PR changes the assertion to ("now", "a second ago")
image

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

@zhaoyongjie zhaoyongjie changed the title fix: flaky test for dashboard changed on fix: flaky test for chart changed on Apr 1, 2022
@zhaoyongjie zhaoyongjie changed the title fix: flaky test for chart changed on fix: flaky test for charts changed on Apr 1, 2022
@zhaoyongjie zhaoyongjie requested a review from a team April 1, 2022 07:14
@codecov
Copy link

codecov bot commented Apr 1, 2022

Codecov Report

Merging #19483 (d510989) into master (eab9388) will decrease coverage by 0.05%.
The diff coverage is n/a.

❗ Current head d510989 differs from pull request most recent head 30d4a5d. Consider uploading reports for the commit 30d4a5d to get more accurate results

@@            Coverage Diff             @@
##           master   #19483      +/-   ##
==========================================
- Coverage   66.58%   66.53%   -0.06%     
==========================================
  Files        1676     1676              
  Lines       64176    64176              
  Branches     6525     6525              
==========================================
- Hits        42732    42697      -35     
- Misses      19745    19780      +35     
  Partials     1699     1699              
Flag Coverage Δ
hive 52.68% <ø> (ø)
mysql 81.90% <ø> (ø)
postgres 81.95% <ø> (ø)
presto ?
python 82.27% <ø> (-0.12%) ⬇️
sqlite 81.72% <ø> (ø)

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

Impacted Files Coverage Δ
superset/db_engine_specs/presto.py 84.30% <0.00%> (-4.82%) ⬇️
superset/connectors/sqla/models.py 88.28% <0.00%> (-1.03%) ⬇️
superset/models/core.py 88.80% <0.00%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eab9388...30d4a5d. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

As it's really challenging to get these timedeltas aligned, I wonder if we should just do assert data["result"][0]["changed_on_delta_humanized"] in ("now", "a second ago")? Not elegant, I know, but should work with very high confidence..

@zhaoyongjie
Copy link
Member Author

As it's really challenging to get these timedeltas aligned, I wonder if we should just do assert data["result"][0]["changed_on_delta_humanized"] in ("now", "a second ago")? Not elegant, I know, but should work with very high confidence..

Unfortunately, humanize.naturaltime doesn't support minutes by minimum unit. I will change to now and 1 second ago.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM

@zhaoyongjie zhaoyongjie merged commit a2e921b into apache:master Apr 1, 2022
@villebro villebro added the lts-v1 label Apr 1, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
villebro pushed a commit that referenced this pull request Apr 4, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 and removed 🚢 2.0.1 labels Mar 13, 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 lts-v1 size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants