Skip to content

Fix flaky test: auto-generated IDs colliding with hardcoded vahter IDs#112

Merged
Szer merged 1 commit intomainfrom
fix-flaky-tests
Feb 10, 2026
Merged

Fix flaky test: auto-generated IDs colliding with hardcoded vahter IDs#112
Szer merged 1 commit intomainfrom
fix-flaky-tests

Conversation

@Szer
Copy link
Contributor

@Szer Szer commented Feb 10, 2026

The shared ID counter in TgMessageUtils started at 1, so auto-generated user IDs could reach 34 or 69 (the hardcoded vahter IDs). When this happened, isBanAuthorized silently rejected the ban (can't ban a vahter), causing "Vahter can unban user" to fail intermittently depending on test collection execution order.

Fix:

  • Bump counter start to 100000 to avoid all hardcoded IDs
  • Add /unbanChatMember to FakeTgApi (was returning 500)
  • Add verbose console logger to CI so test execution order is visible

The shared ID counter in TgMessageUtils started at 1, so auto-generated
user IDs could reach 34 or 69 (the hardcoded vahter IDs). When this
happened, isBanAuthorized silently rejected the ban (can't ban a vahter),
causing "Vahter can unban user" to fail intermittently depending on test
collection execution order.

Fix:
- Bump counter start to 100000 to avoid all hardcoded IDs
- Add /unbanChatMember to FakeTgApi (was returning 500)
- Add verbose console logger to CI so test execution order is visible

Co-authored-by: Cursor <cursoragent@cursor.com>
@Szer Szer enabled auto-merge (squash) February 10, 2026 08:19
@Szer Szer merged commit dbd1940 into main Feb 10, 2026
1 check passed
@Szer Szer deleted the fix-flaky-tests branch February 10, 2026 08:21
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