Kafka
  1. Kafka
  2. KAFKA-1377

transient unit test failure in LogOffsetTest

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: core
    • Labels:

      Description

      Saw the following transient unit test failure.

      kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
      junit.framework.AssertionFailedError: expected:<List(0)> but was:<Vector()>
      at junit.framework.Assert.fail(Assert.java:47)
      at junit.framework.Assert.failNotEquals(Assert.java:277)
      at junit.framework.Assert.assertEquals(Assert.java:64)
      at junit.framework.Assert.assertEquals(Assert.java:71)
      at kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:198)

      1. KAFKA-1377.patch
        0.7 kB
        Jun Rao
      2. KAFKA-1377_2014-04-11_18:14:45.patch
        3 kB
        Jun Rao
      3. KAFKA-1377_2014-04-11_17:42:13.patch
        3 kB
        Jun Rao

        Activity

        Hide
        Jun Rao added a comment -

        Not sure the exact cause. One potential issue that I saw is the following. We call
        waitUntilTrue(() => isLeaderLocalOnBroker(topic, part, server), 1000)
        before the assertion. However, if waitUntilTrue returns false. We proceed. We should add the assertion on waitUntilTrue and probably increase the wait time.

        Show
        Jun Rao added a comment - Not sure the exact cause. One potential issue that I saw is the following. We call waitUntilTrue(() => isLeaderLocalOnBroker(topic, part, server), 1000) before the assertion. However, if waitUntilTrue returns false. We proceed. We should add the assertion on waitUntilTrue and probably increase the wait time.
        Hide
        Jun Rao added a comment -

        Created reviewboard https://reviews.apache.org/r/20186/
        against branch origin/trunk

        Show
        Jun Rao added a comment - Created reviewboard https://reviews.apache.org/r/20186/ against branch origin/trunk
        Hide
        Jun Rao added a comment -

        Updated reviewboard https://reviews.apache.org/r/20186/
        against branch origin/trunk

        Show
        Jun Rao added a comment - Updated reviewboard https://reviews.apache.org/r/20186/ against branch origin/trunk
        Hide
        Jun Rao added a comment -

        Updated reviewboard https://reviews.apache.org/r/20186/
        against branch origin/trunk

        Show
        Jun Rao added a comment - Updated reviewboard https://reviews.apache.org/r/20186/ against branch origin/trunk
        Hide
        Jun Rao added a comment -

        Thanks for the review. Committed to trunk.

        Show
        Jun Rao added a comment - Thanks for the review. Committed to trunk.
        Hide
        Manikumar Reddy added a comment -

        LogOffsetTests are consistently failing on my machine.

        kafka.server.LogOffsetTest > testGetOffsetsBeforeLatestTime FAILED
        junit.framework.AssertionFailedError: Log for partition [topic,0] should be created
        at junit.framework.Assert.fail(Assert.java:47)
        at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589)
        at kafka.server.LogOffsetTest.testGetOffsetsBeforeLatestTime(LogOffsetTest.scala:85)

        kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED
        junit.framework.AssertionFailedError: Leader should be elected
        at junit.framework.Assert.fail(Assert.java:47)
        at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589)
        at kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:188)

        kafka.server.LogOffsetTest > testEmptyLogsGetOffsets FAILED
        junit.framework.AssertionFailedError: Partition [kafka,0] metadata not propagated after 5000 ms
        at junit.framework.Assert.fail(Assert.java:47)
        at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589)
        at kafka.utils.TestUtils$.waitUntilMetadataIsPropagated(TestUtils.scala:629)
        at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:174)
        at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:173)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
        at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285)
        at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
        at scala.collection.immutable.Range.map(Range.scala:39)
        at kafka.utils.TestUtils$.createTopic(TestUtils.scala:173)
        at kafka.server.LogOffsetTest.testEmptyLogsGetOffsets(LogOffsetTest.scala:122)

        kafka.server.LogOffsetTest > testGetOffsetsBeforeNow FAILED
        junit.framework.AssertionFailedError: Leader should be elected
        at junit.framework.Assert.fail(Assert.java:47)
        at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589)
        at kafka.server.LogOffsetTest.testGetOffsetsBeforeNow(LogOffsetTest.scala:160)

        Show
        Manikumar Reddy added a comment - LogOffsetTests are consistently failing on my machine. kafka.server.LogOffsetTest > testGetOffsetsBeforeLatestTime FAILED junit.framework.AssertionFailedError: Log for partition [topic,0] should be created at junit.framework.Assert.fail(Assert.java:47) at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589) at kafka.server.LogOffsetTest.testGetOffsetsBeforeLatestTime(LogOffsetTest.scala:85) kafka.server.LogOffsetTest > testGetOffsetsBeforeEarliestTime FAILED junit.framework.AssertionFailedError: Leader should be elected at junit.framework.Assert.fail(Assert.java:47) at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589) at kafka.server.LogOffsetTest.testGetOffsetsBeforeEarliestTime(LogOffsetTest.scala:188) kafka.server.LogOffsetTest > testEmptyLogsGetOffsets FAILED junit.framework.AssertionFailedError: Partition [kafka,0] metadata not propagated after 5000 ms at junit.framework.Assert.fail(Assert.java:47) at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589) at kafka.utils.TestUtils$.waitUntilMetadataIsPropagated(TestUtils.scala:629) at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:174) at kafka.utils.TestUtils$$anonfun$createTopic$1.apply(TestUtils.scala:173) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.immutable.Range$ByOne$class.foreach(Range.scala:285) at scala.collection.immutable.Range$$anon$2.foreach(Range.scala:265) at scala.collection.TraversableLike$class.map(TraversableLike.scala:206) at scala.collection.immutable.Range.map(Range.scala:39) at kafka.utils.TestUtils$.createTopic(TestUtils.scala:173) at kafka.server.LogOffsetTest.testEmptyLogsGetOffsets(LogOffsetTest.scala:122) kafka.server.LogOffsetTest > testGetOffsetsBeforeNow FAILED junit.framework.AssertionFailedError: Leader should be elected at junit.framework.Assert.fail(Assert.java:47) at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:589) at kafka.server.LogOffsetTest.testGetOffsetsBeforeNow(LogOffsetTest.scala:160)
        Hide
        Jun Rao added a comment -

        Is this on trunk? Thanks,

        Show
        Jun Rao added a comment - Is this on trunk? Thanks,
        Hide
        Manikumar Reddy added a comment -

        Yes. I am observing these failures on trunk.

        Show
        Manikumar Reddy added a comment - Yes. I am observing these failures on trunk.
        Hide
        Neha Narkhede added a comment -

        Jun Rao, reopening this as per Manikumar Reddy's observation

        Show
        Neha Narkhede added a comment - Jun Rao , reopening this as per Manikumar Reddy 's observation
        Hide
        Guozhang Wang added a comment -

        Pushing to 0.9 as for now, Manikumar Reddy is it still a consistently reproducible issue on your side?

        Show
        Guozhang Wang added a comment - Pushing to 0.9 as for now, Manikumar Reddy is it still a consistently reproducible issue on your side?
        Hide
        Manikumar Reddy added a comment -

        Yes, these failures are consistent on my machine.

        My machine configuration: 32 bit Ubuntu OS, i5 processor, 4GB

        Show
        Manikumar Reddy added a comment - Yes, these failures are consistent on my machine. My machine configuration: 32 bit Ubuntu OS, i5 processor, 4GB
        Hide
        Manikumar Reddy added a comment -

        now i am not getting this exception..so closing the issue.

        Show
        Manikumar Reddy added a comment - now i am not getting this exception..so closing the issue.

          People

          • Assignee:
            Jun Rao
            Reporter:
            Jun Rao
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development