-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
None
-
1
-
False
-
-
False
-
subs-swatch-lightning
-
-
-
Swatch Lightning Sprint 7
We're seeing intermittent failures in ContractsSyncComponentTest.shouldReturnFailedStatusWhenNoContractsExist() where the test finds contracts in the database when it expects none.
The test failure looks like this:
Expected: No active contract found for the orgIds
Actual: All Contract are Synced
The issue happens because our test teardown (@AfterEach) runs immediately after a test completes, but some tests send messages to Artemis that trigger async operations. These operations can take several seconds to complete, especially in Konflux where WireMock responses can be slow (we've seen up to 3 seconds). When the cleanup runs before the async processing finishes, the contract gets created after the cleanup attempt, leaving orphaned data in the database.
Acceptance Criteria
- Remove the test plan "contracts-sync-TC004" and implement this test as a regular test in the service.