Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31419

Fix TestLogStreamProcessorMem.testStopStartComputation randomness

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.0
    • Component/s: Streams, Tests
    • Sprint:
      nxplatform #75, nxplatform #79
    • Story Points:
      1

      Description

      We have observed that TestLogStreamProcessorMem.testStopStartComputation test could be random on the CI. The Memory implementation seems to be a bit slow sometimes which leads to issues in this test like below:

      [2022-11-16T10:58:31.054Z] [ERROR] testStopStartComputation(org.nuxeo.lib.stream.tests.computation.TestLogStreamProcessorMem)  Time elapsed: 1.008 s  <<< FAILURE!
      [2022-11-16T10:58:31.054Z] java.lang.AssertionError: expected:<LogLag{lower=2, upper=5, lag=3, lowerOffset=2, upperOffset=5}> but was:<LogLag{lower=2, upper=10, lag=8, lowerOffset=2, upperOffset=10}>
      [2022-11-16T10:58:31.054Z] 	at org.junit.Assert.fail(Assert.java:89)
      [2022-11-16T10:58:31.054Z] 	at org.junit.Assert.failNotEquals(Assert.java:835)
      [2022-11-16T10:58:31.054Z] 	at org.junit.Assert.assertEquals(Assert.java:120)
      [2022-11-16T10:58:31.054Z] 	at org.junit.Assert.assertEquals(Assert.java:146)
      [2022-11-16T10:58:31.054Z] 	at org.nuxeo.lib.stream.tests.computation.TestStreamProcessor.testStopStartComputation(TestStreamProcessor.java:740)
      

      or

      [2022-11-16T11:07:08.343Z] [ERROR] testStopStartComputation(org.nuxeo.lib.stream.tests.computation.TestLogStreamProcessorMem)  Time elapsed: 0.107 s  <<< FAILURE!
      [2022-11-16T11:07:08.343Z] java.lang.AssertionError: Latency{lat=0, lower=0, upper=1668596798371, key=, lag=LogLag{lower=10, upper=10, lag=0, lowerOffset=10, upperOffset=10}}
      [2022-11-16T11:07:08.343Z] 	at org.junit.Assert.fail(Assert.java:89)
      [2022-11-16T11:07:08.343Z] 	at org.junit.Assert.assertTrue(Assert.java:42)
      [2022-11-16T11:07:08.343Z] 	at org.nuxeo.lib.stream.tests.computation.TestStreamProcessor.testStopStartComputation(TestStreamProcessor.java:736)
      

      Both failures could be explained by a slow producer.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: