Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3343

JCQueueTest can still be flaky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None

    Description

      Made a mistake in the fix for STORM-3310. The consumer in one of the tests check for interrupt in a place it shouldn't.

      [ERROR] Failures:
      [ERROR]   JCQueueTest.lambda$testFirstMessageFirst$0:63 We expect to receive first published message first, but received null expected:<FIRST> but was:<null>
      
      Exception in thread "Thread-125" java.lang.RuntimeException: java.lang.InterruptedException: ConsumerThd interrupted
      	at org.apache.storm.utils.JCQueueTest$1.accept(JCQueueTest.java:48)
      	at org.apache.storm.utils.JCQueue.consumeImpl(JCQueue.java:133)
      	at org.apache.storm.utils.JCQueue.consume(JCQueue.java:110)
      	at org.apache.storm.utils.JCQueue.consume(JCQueue.java:101)
      	at org.apache.storm.utils.JCQueueTest$ConsumerThd.run(JCQueueTest.java:207)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.InterruptedException: ConsumerThd interrupted
      	... 6 more
      

      The consumer accept method shouldn't check for interrupt, as that is handled by the ConsumerThd.run method. When the accept check for interrupt is hit, the consumer exits without draining the JCQueue, and the test may fail.

      Attachments

        Issue Links

          Activity

            People

              srdo Stig Rohde Døssing
              srdo Stig Rohde Døssing
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m