Skip to content

fix(test): use unique bridge names and relaxed count assertions#21966

Open
Fletch153 wants to merge 3 commits intodevelopfrom
fix/CORE-2391-db-test-isolation
Open

fix(test): use unique bridge names and relaxed count assertions#21966
Fletch153 wants to merge 3 commits intodevelopfrom
fix/CORE-2391-db-test-isolation

Conversation

@Fletch153
Copy link
Copy Markdown
Collaborator

Summary

  • TestORM_UpdateBridgeType used hardcoded name "UniqueName" and asserted global bridge_types count was exactly 1
  • With shared DB state (parallel tests or -count=N), the global count includes bridges from other tests
  • Fix: use UUID-based unique names and assert >=1 instead of exact count; verify deletion via FindBridge error

Test plan

  • CI passes (requires DB — cannot test locally)

Fixes: CORE-2391

TestORM_UpdateBridgeType used a hardcoded "UniqueName" and asserted
the global bridge count was exactly 1. With shared DB state from
parallel tests or -count=N, the global count includes other bridges.

Use UUID-based names and assert >= 1 instead of exact count. Verify
deletion by checking the specific bridge is not found.

Fixes: CORE-2391
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 10, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

The GreaterOrEqual count check was still fragile. The test only needs
to verify its own bridge exists and can be deleted — not count how
many bridges exist globally.

Fixes: CORE-2391
The txdb wrapper should provide per-test transaction isolation, so
exact count assertions are valid. Restore them — if CI fails, the
real bug is broken DB isolation, not the test.

The only change from the original test is UUID-based bridge names
to avoid hardcoded "UniqueName" collisions.

Fixes: CORE-2391
@cl-sonarqube-production
Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant