Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-4238

Fix Flaky Test: HBI flush test fails with unexpected record count

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • swatch-metrics-hbi
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • subs-swatch-thunder

      The flaky test fails because the background flushing service unpredictably processes an extra record (4 instead of the expected 3), likely due to a timing race or a data leak from a previous test run.

       

      Fix flaky testFlushOutboxRecordsProtectedByUnleashFlag in JUnit for swatch-metrics-hbi

      This test is randomly failing in CI. For ex: https://github.com/RedHatInsights/rhsm-subscriptions/actions/runs/19358882475/job/55385819352?pr=5210

      Error:  Failures: 
      Error:    HbiEventOutboxServiceTest.testFlushOutboxRecordsProtectedByUnleashFlag:117 expected: <3> but was: <4>
      

      This is causing all the CI to fail. Doing a /retest sometimes fixes it which confirms it's a flaky test.

      Acceptance Criteria

      • Investigate why this test is flaky and fix it.

              Unassigned Unassigned
              jcarvaja@redhat.com Jose Carvajal Hilario
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: