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(test): make test_clean_requests_after_schema_grant more idempotent #19625

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Apr 8, 2022

SUMMARY

Fix a potential table name conflict in integration tests test_clean_requests_after_schema_grant.

Sometimes when the example database has wb_health_population's schema in another name---for example, public instead of None when in postgres (depending on how you configure SQLALCHEMY_EXAMPLES_URI), rerunning this test will fail and report "table already exists" error from here. It seems the intention of the test was to reset table.schema to its original schema, but simply assumed it used to be None. This PR makes this test more idempotent by actually changing the schema of the same table to the original schema.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Make sure CI passes.

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

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #19625 (00137bc) into master (d52e386) will decrease coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #19625      +/-   ##
==========================================
- Coverage   66.53%   66.38%   -0.16%     
==========================================
  Files        1681     1681              
  Lines       64319    64319              
  Branches     6564     6564              
==========================================
- Hits        42793    42696      -97     
- Misses      19853    19950      +97     
  Partials     1673     1673              
Flag Coverage Δ
hive 52.66% <ø> (ø)
mysql ?
postgres ?
presto 52.51% <ø> (ø)
python 82.07% <ø> (-0.31%) ⬇️
sqlite 81.71% <ø> (ø)
unit 47.24% <ø> (ø)

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

Impacted Files Coverage Δ
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/databases/commands/create.py 64.70% <0.00%> (-27.46%) ⬇️
superset/views/database/mixins.py 60.34% <0.00%> (-20.69%) ⬇️
superset/databases/commands/update.py 85.71% <0.00%> (-8.17%) ⬇️
superset/common/utils/dataframe_utils.py 85.71% <0.00%> (-7.15%) ⬇️
superset/databases/api.py 87.98% <0.00%> (-6.01%) ⬇️
superset/databases/schemas.py 94.42% <0.00%> (-4.09%) ⬇️
superset/db_engine_specs/mysql.py 93.97% <0.00%> (-3.62%) ⬇️
superset/reports/commands/log_prune.py 85.71% <0.00%> (-3.58%) ⬇️
superset/db_engine_specs/postgres.py 95.45% <0.00%> (-1.82%) ⬇️
... and 9 more

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 d52e386...00137bc. Read the comment docs.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM.

@ktmud ktmud merged commit 738bd04 into apache:master Apr 9, 2022
@john-bodley john-bodley deleted the test-fix branch June 8, 2022 05:34
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 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 size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants