Skip to content

chore(tests): move oceanbase peewee test under test/ and fix enum check - #12969

Merged
KevinHuSh merged 1 commit into
infiniflow:mainfrom
Rynzie02:test/fix-oceanbase-peewee-enum-check
Feb 3, 2026
Merged

KevinHuSh merged 1 commit into
infiniflow:mainfrom
Rynzie02:test/fix-oceanbase-peewee-enum-check

Conversation

@Rynzie02

@Rynzie02 Rynzie02 commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

This mistake was made by PR #12926
This PR makes the OceanBase peewee unit test discoverable by the default unit test runner/CI (by moving it under test/), so it’s included in the unified unit test suite.
It also fixes test_database_lock_enum_values to correctly handle Enum alias members (DatabaseLock uses the same value for MYSQL and OCEANBASE).

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

Screenshots

The original test_oceanbase_peewee.py was placed under tests/, which isn’t included in the default unit test runner’s testpaths, so it wasn’t picked up by the unit test suite. So we need to move it to correct path.
image

When using old version in test_oceanbase_peewee.py:

    def test_database_lock_enum_values(self):
        """Test DatabaseLock enum has all expected values."""
        expected = {'MYSQL', 'OCEANBASE', 'POSTGRES'}
        actual = {e.name for e in DatabaseLock}
        assert expected.issubset(actual), f"Missing: {expected - actual}"

The old check iterated Enum members, so alias values were skipped and only MYSQL/POSTGRES were seen, making OCEANBASE appear missing.

65e2837f23b7b298980a410c7d5c2f09

and new version uses DatabaseLock.__members__ and passes:
1aa8c6facb28d24149270fe1bc4a9dd9

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🧪 test Pull requests that update test cases. labels Feb 3, 2026
@KevinHuSh KevinHuSh added the ci Continue Integration label Feb 3, 2026
@KevinHuSh
KevinHuSh marked this pull request as draft February 3, 2026 08:46
@KevinHuSh
KevinHuSh marked this pull request as ready for review February 3, 2026 08:46
@KevinHuSh
KevinHuSh merged commit 7b230aa into infiniflow:main Feb 3, 2026
1 check passed
@codecov

codecov Bot commented Feb 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (2e5a186) to head (cd632b3).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #12969       +/-   ##
===========================================
- Coverage   44.46%        0   -44.47%     
===========================================
  Files          43        0       -43     
  Lines        9266        0     -9266     
  Branches      107        0      -107     
===========================================
- Hits         4120        0     -4120     
+ Misses       5127        0     -5127     
+ Partials       19        0       -19     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧪 test Pull requests that update test cases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants