ServiceMix
  1. ServiceMix
  2. SM-2286

Intermittent test failure in ActivitiExamplesTest.testActivitiCamelExample

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.1, 5.1.0, 6.0.0
    • Fix Version/s: 5.0.1, 5.1.0, 6.0.0.M1, 6.0.0
    • Component/s: itests
    • Labels:
      None

      Description

      There is an intermittent failure in ActivitiExamplesTest.testActivitiCamelExample

      Caused by: java.lang.AssertionError: Gave up waiting for test condition
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.apache.servicemix.itests.IntegrationTestSupport.expect(IntegrationTestSupport.scala:83)
      	at org.apache.servicemix.itests.ActivitiExamplesTest$$anonfun$testActivitiCamelExample$1.apply$mcV$sp(ExamplesIntegrationTests.scala:75)
      	at org.apache.servicemix.itests.IntegrationTestSupport.testWithFeature(IntegrationTestSupport.scala:74)
      	at org.apache.servicemix.itests.ActivitiExamplesTest.testActivitiCamelExample(ExamplesIntegrationTests.scala:58)
      

        Activity

        Hide
        Krzysztof Sobkowiak added a comment -

        Thanks Gert for the patch. The itests run faster after applying the patch.

        Show
        Krzysztof Sobkowiak added a comment - Thanks Gert for the patch. The itests run faster after applying the patch.
        Show
        Krzysztof Sobkowiak added a comment - Patch applied in 5.0.x – https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=350112d38a415601b60b35edc54e7885345d65b9 5.1.x – https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=787232f7f777d16e639b58cb5f5f1339399002c5 6.0.x – https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=d55bc5eda7c9d7dd8b9dda9b99e2ea6381d3bacf
        Hide
        Krzysztof Sobkowiak added a comment -

        I have applied your patch. I have started 30 itests runs. The problem should occur 2-3 times if your patch doesn't solve it. But it is only a probability.

        Show
        Krzysztof Sobkowiak added a comment - I have applied your patch. I have started 30 itests runs. The problem should occur 2-3 times if your patch doesn't solve it. But it is only a probability.
        Hide
        Krzysztof Sobkowiak added a comment -

        I'll try it. Some days ago we had to reset our passwords. Perhaps this is your problem. Try to reset the apacheid password.

        Show
        Krzysztof Sobkowiak added a comment - I'll try it. Some days ago we had to reset our passwords. Perhaps this is your problem. Try to reset the apacheid password.
        Hide
        Gert Vanthienen added a comment -

        I'm unable to reproduce this on my machine, but looking over the log file you attached, you may be right that the test just isn't waiting long enough. Also spotted a bug in the Await trait, causing it to wait 8 seconds at the end, but not to check the condition (ic. if the log entry exists) again after that delay.

        Having some problems pushing changes at the moment, but I'm attaching a patch with the presumed fix so someone else can already give it go (or push it if it works). If that doesn't fix the issue, you can try setting the MAXIMUM_DELAY to 16000 to allow for an even longer time for the log message to appear.

        Show
        Gert Vanthienen added a comment - I'm unable to reproduce this on my machine, but looking over the log file you attached, you may be right that the test just isn't waiting long enough. Also spotted a bug in the Await trait, causing it to wait 8 seconds at the end, but not to check the condition (ic. if the log entry exists) again after that delay. Having some problems pushing changes at the moment, but I'm attaching a patch with the presumed fix so someone else can already give it go (or push it if it works). If that doesn't fix the issue, you can try setting the MAXIMUM_DELAY to 16000 to allow for an even longer time for the log message to appear.
        Hide
        Krzysztof Sobkowiak added a comment -

        This test fails with the same frequency on ServiceMix 6 (based on Karaf 3)

        Show
        Krzysztof Sobkowiak added a comment - This test fails with the same frequency on ServiceMix 6 (based on Karaf 3)
        Hide
        Krzysztof Sobkowiak added a comment -

        This problem can not be reproduced in the current servicemix-5.0.0 tag. It means, the problem is probably connected with the Activiti upgrade.

        Show
        Krzysztof Sobkowiak added a comment - This problem can not be reproduced in the current servicemix-5.0.0 tag. It means, the problem is probably connected with the Activiti upgrade.
        Hide
        Krzysztof Sobkowiak added a comment -

        The test case fails at following line

        expect { logging.containsMessage(line => line.contains(s"Processing delivery for order ${orderId}")) }
        

        It means, the log entry Processing delivery for order 001 could not be found. But the message can be found in the attached log file

        21:23:55,059 | INFO  | i-camel/delivery | route4                           | 97 - org.apache.camel.camel-core - 2.13.0 | Processing delivery for order 001 created on 2014-04-26 21:23:45
        

        Probably the expect method stops waiting for the log entry before the event is logged in the log file.

        Show
        Krzysztof Sobkowiak added a comment - The test case fails at following line expect { logging.containsMessage(line => line.contains(s "Processing delivery for order ${orderId}" )) } It means, the log entry Processing delivery for order 001 could not be found. But the message can be found in the attached log file 21:23:55,059 | INFO | i-camel/delivery | route4 | 97 - org.apache.camel.camel-core - 2.13.0 | Processing delivery for order 001 created on 2014-04-26 21:23:45 Probably the expect method stops waiting for the log entry before the event is logged in the log file.

          People

          • Assignee:
            Krzysztof Sobkowiak
            Reporter:
            Krzysztof Sobkowiak
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development