You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Peter Firmstone <ji...@zeus.net.au> on 2013/05/04 22:07:52 UTC
What do you make of this test failure
This test is currently run automatically, the test must be run manually
with a modified ServiceDiscoveryManager.
The correct test conditions are not simulated.
The test appears to be looking for a race condition based on timing, the
SDM hasn't been modified as per the tests original intent.
Unfortunately the modifications required for ServiceDiscoveryManager
aren't apparrent and we don't have the bug description because Oracle
removed all Jini bugs from the Sun Bug database.
We have the sequence of events that are intended to generate the bug,
but no timings? Anyone smart enough to figure this one out?
Thoughts?
/**
* This test attempts to simulate the following race condition that
* can occur between an instance of LookupTask and an instance of
* DropProxyRegTask:
*
* - 1 LUS {L0}
* - 1 service s0 registered in L0
* - 1 cache C0 with template matching s0
*
* Upon creation of the cache, LookupTask is initiated for L0. The test
* waits a few seconds after the cache is created because if L0 is
discarded
* too quickly, L0 will be removed from the proxyRegSet before
LookupTask
* has a chance to begin any processing. After the wait period is up,
* L0 is discarded; which initiates the DropProxyRegTask. The race
occurs
* as follows:
* LookupTask DropProxyRegTask
* ----------------------------
----------------------------------------
* o determine s0 is "new"
* o sleep for n seconds o remove L0 from proxyRegSet
* o serviceIdMap is empty, do
nothing else
* o add new s0 to serviceIdMap
*
* The result is that serviceIdMap should NOT be empty when
DropProxyRegTask
* encounters it. But if LookupTask is too slow in adding s0 to the
map,
* DropProxyRegTask will have nothing to remove, and so will return
without
* modifying serviceIdMap. But when LookupTask returns, s0 will be
contained
* in serviceIdMap; even though it shouldn't.
*
* In order to insert the time delay, the SDM must be modified.
Also, in
* order to observe the race, println's must be inserted in the SDM to
* display whether the serviceIdMap is empty/non-empty when it is
supposed
* to be empty/non-empty. That is, the pass/fail status of this
test cannot
* be determined by the test itself; it must be observed by the test
* engineer. Thus, this test will always return a pass status.
*
* This test is not part of the regular suite. It must be run
manually, with
* a temporarily-modified SDM.
*
* Related bug ids: 4675746
* 4707125
*/
Jenkins Failure:
NonActGrp-out:
com.sun.jini.qa.harness.TestException: -- failure -- nAdded = 1,
nAddedExpected = 1; nRemoved = 0, nRemovedExpected = 1
at
com.sun.jini.test.impl.servicediscovery.event.LookupDropProxyTaskRace.applyTestDef(LookupDropProxyTaskRace.java:206)
at
com.sun.jini.test.spec.servicediscovery.AbstractBaseTest.run(AbstractBaseTest.java:540)
at com.sun.jini.qa.harness.MasterTest.doTest(MasterTest.java:256)
at com.sun.jini.qa.harness.MasterTest.main(MasterTest.java:144)
TIME: 4:31:58 AM
Test process was destroyed and returned code 1
com/sun/jini/test/impl/servicediscovery/event/LookupDropProxyTaskRace.td
Test Failed: Test Failed: com.sun.jini.qa.harness.TestException: --
failure -- nAdded = 1, nAddedExpected = 1; nRemoved = 0,
nRemovedExpected = 1
Local Failure:
Starting test in separate process with command:
'C:\Program Files\Java\jdk1.6.0_26\jre\bin\java'
-Djava.security.manager=org.apache.river.api.security.CombinerSecurityManager
-Djava.security.policy=file:/C:/Users/peter/Documents/NetBeansProjects/peterConcurrentPolicy/qa/harness/policy/defaulttest.policy
-Djava.rmi.server.codebase=http://medusa:9082/qa1-servicediscovery-dl.jar
-cp
C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib\jiniharness.jar;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib\jinitests.jar;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib\jsk-platform.jar;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib\jsk-lib.jar;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib\high-scale-lib.jar;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib\custard-apple-1.0.3.jar
-ea -esa -client '-Djava.ext.dirs=C:\Program
Files\Java\jdk1.6.0_26\jre\lib\ext;C:\windows\Sun\Java\lib\ext;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib-ext;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib-ext'
-Dcom.sun.jini.jsk.port=9080 -Dcom.sun.jini.qa.port=9081
-Dcom.sun.jini.jsk.home=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy
-Dcom.sun.jini.qa.home=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa
-Dcom.sun.jini.qa.harness.harnessJar=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib\jiniharness.jar
-Dcom.sun.jini.qa.harness.testJar=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib\jinitests.jar
-Dcom.sun.jini.qa.harness.runjiniserver=true
-Dcom.sun.jini.qa.harness.runkitserver=true
-Djava.security.properties=file:/C:/Users/peter/Documents/NetBeansProjects/peterConcurrentPolicy/qa/harness/trust/dynamic-policy.properties
-Dcom.sun.jini.qa.harness.testhosts=
-Djava.util.logging.config.file=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\src\com\sun\jini\test\resources\qa1.logging
-Dcom.sun.jini.test.home=C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa
-Dcom.sun.jini.test.port=9082
-Dcom.sun.jini.qa.harness.policies=file:/C:/Users/peter/Documents/NetBeansProjects/peterConcurrentPolicy/qa/src/com/sun/jini/test/resources/jinitest.policy
'-Djava.ext.dirs=C:\Program
Files\Java\jdk1.6.0_26\jre\lib\ext;C:\windows\Sun\Java\lib\ext;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\qa\lib-ext;C:\Users\peter\Documents\NetBeansProjects\peterConcurrentPolicy\lib-ext'
com.sun.jini.qa.harness.MasterTest
com/sun/jini/test/impl/servicediscovery/event/LookupDropProxyTaskRace.td
com.sun.jini.qa.harness.TestException: -- failure -- nAdded = 0,
nAddedExpected = 1; nRemoved = 0, nRemovedExpected = 1
at
com.sun.jini.test.impl.servicediscovery.event.LookupDropProxyTaskRace.applyTestDef(LookupDropProxyTaskRace.java:206)
at
com.sun.jini.test.spec.servicediscovery.AbstractBaseTest.run(AbstractBaseTest.java:549)
at com.sun.jini.qa.harness.MasterTest.doTest(MasterTest.java:256)
at com.sun.jini.qa.harness.MasterTest.main(MasterTest.java:144)
TIME: 5:25:52 AM
Test process was destroyed and returned code 1
com/sun/jini/test/impl/servicediscovery/event/LookupDropProxyTaskRace.td
Test Failed: Test Failed: com.sun.jini.qa.harness.TestException: --
failure -- nAdded = 0, nAddedExpected = 1; nRemoved = 0,
nRemovedExpected = 1