ohla-0.6: testsuite fail on linux

coding
2014-02-11
2014-02-11
  • coding

    coding - 2014-02-11

    Hi,
    I am interested in using ohla package to test our simulation environment
    together with VBS2 system. I've downloaded ohla-0.6.zip package and
    started the tests, as written in TESTSUITE.txt:
    1. ant start-rti in one terminal
    2. ant testsuite in second terminal

    One of the tests fails:
    [...]
    [testng] PASSED: testTimeAdvanceRequestAvailableToSameTime
    [testng] PASSED: testNextMessageRequest
    [testng] PASSED: testNextMessageRequestAvailable
    [testng] FAILED: testFlushQueueRequest
    [testng] java.lang.AssertionError
    [testng] at
    net.sf.ohla.rti.testsuite.hla.rti1516e.time.TimeManagementFederateAmbassador.checkParameterValues(TimeManagementFederateAmbassador.java:276)
    [testng] at
    net.sf.ohla.rti.testsuite.hla.rti1516e.time.FlushQueueRequestTestNG.testFlushQueueRequest(FlushQueueRequestTestNG.java:108)
    [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method)
    [testng] at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [testng] at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [testng] at java.lang.reflect.Method.invoke(Method.java:597)
    [testng] at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    [testng] at
    org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    [testng] at
    org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    [testng] at
    org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    [testng] at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    [testng] at
    org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    [testng] at org.testng.TestRunner.privateRun(TestRunner.java:767)
    [testng] at org.testng.TestRunner.run(TestRunner.java:617)
    [testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    [testng] at
    org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    [testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    [testng] at
    org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    [testng] at
    org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    [testng] at
    org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
    [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
    [testng] at org.testng.TestNG.run(TestNG.java:1031)
    [testng] at org.testng.TestNG.privateMain(TestNG.java:1338)
    [testng] at org.testng.TestNG.main(TestNG.java:1307)

    Meanwhile ant start-rti output looks like this:
    [...]
    [java] 14:06:41.140 DEBUG [n.s.o.r.f.FederationExecutionTimeManager]
    [] potential GALT: 1
    [java] 14:06:41.140 DEBUG [n.s.o.r.f.FederationExecutionTimeManager]
    [] GALT updated: 1 to 1
    [java] 14:06:41.141 DEBUG [n.s.o.r.f.FederateProxy]
    [FlushQueueRequestTestNG.Test Federate 2] GALT updated: 1 to 1
    [java] 14:06:41.141 DEBUG [n.s.o.r.f.FederateProxy]
    [FlushQueueRequestTestNG.Test Federate 1] GALT updated: 1 to 1
    [java] 14:06:45.182 DEBUG [n.s.o.r.f.FederateProxy]
    [FlushQueueRequestTestNG.Test Federate 1] federate resigned:
    UNCONDITIONALLY_DIVEST_ATTRIBUTES
    [java] 14:06:45.183 DEBUG [n.s.o.r.f.FederateProxy]
    [FlushQueueRequestTestNG.Test Federate 2] federate resigned:
    UNCONDITIONALLY_DIVEST_ATTRIBUTES
    [java] 14:06:45.185 DEBUG [net.sf.ohla.rti.RTI ] [] destroy
    FederationExecution: FlushQueueRequestTestNG
    [java] 14:06:45.185 DEBUG [n.s.o.r.f.FederationExecution]
    [FlushQueueRequestTestNG] FederationExecution destroyed

    I believe first message at 14:06:45.182 is the first message after the
    test fail.

    Happens on:
    1. Fedora 20, 32-bit with openjdk-7
    2. Ubuntu 12.04, 64-bit, with openjdk-6, oracle jdk1.6.0_45, oracle
    jdk1.7.0_51

    However - all tests pass on Windows 7, 64-bit, with oracle jdk1.7.0_51

    UPDATE: I just repeated testsuite on Windows machine with almost-the-same configuration, but mouch less powerful CPU (previous one: i7-2600K@3.4GHz, this one: AMD Athlon II Neo K325@1.3GHz) and there were also failed tests. I ran testsuite a few times and there were fails in hla-1.3, ieee-1516 and ieee-1516e, always on testFlushQueueRequest (so sometimes it worked well, so next tests could be executed, and sometimes not).

    A race? Performance issues?

     
    Last edit: coding 2014-02-11
  • Michael Newcomb

    Michael Newcomb - 2014-02-11

    In that test, federate[0] sends 2 interactions (one at 5, the other at 10) during setup. In the actual test, federate[1] does flushQueueRequest() which should put 2 items in his callback queue.

    However, the flushQueueRequest() could be processed by the RTI before both receive interactions are put on federate[1]'s queue. I think this is what is happening.

    If you move the synchronize() call on line 83 to the end of the constructor (after federate[0] sends the interactions, where it should be) that should force the sendInteractions() to be processed by the RTI (since it must to process the synchronize).

    Michael

     
  • coding

    coding - 2014-02-11

    If you move the synchronize() call on line 83 to the end of the constructor (after federate[0] sends the interactions, where it should be) that should force the sendInteractions() to be processed by the RTI (since it must to process the synchronize).

    Confirmed. After fixing each FlushQueueRequestTestNG.java all tests pass.

    Thank you for such a quick reply.

     
  • Michael Newcomb

    Michael Newcomb - 2014-02-11

    I'll make sure the synchronize calls are all at the end of the constructor where they should be.

     

Log in to post a comment.