jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Updated] (OAK-1176) ObservationTest#observationDispose fails every now and then
Date Wed, 13 Nov 2013 12:03:23 GMT

     [ https://issues.apache.org/jira/browse/OAK-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Dürig updated OAK-1176:
-------------------------------

    Attachment: OAK-1176-2.patch
                OAK-1176-1.patch

This is most probably due to a race condition in {{BackgroundObserver}}. Even though the {{STOP}}
signal might be in the queue, there is still the chance of a pending change that has been
taken from the queue earlier being passed to the observer. 

Two variants for fixing:
* OAK-1176-1.patch addresses this by synchronising notification of the observer. This approach
might be prone to dead locks. 

* OAK-1176-2.patch addresses the issue by having the {{stop()}} call join the back ground
thread. 

[~anchela] since I can't reproduce the test failure locally, could to try out the patches
and feedback?

> ObservationTest#observationDispose fails every now and then
> -----------------------------------------------------------
>
>                 Key: OAK-1176
>                 URL: https://issues.apache.org/jira/browse/OAK-1176
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: angela
>            Priority: Minor
>         Attachments: OAK-1176-1.patch, OAK-1176-2.patch
>
>
> on my computer ObservationTest#observationDispose failes every now and then but always
succeeds when i run the oak-jcr tests again after the failure:
> observationDispose[0](org.apache.jackrabbit.oak.jcr.observation.ObservationTest)  Time
elapsed: 0.335 sec  <<< FAILURE!
> java.lang.AssertionError
> 	at org.junit.Assert.fail(Assert.java:92)
> 	at org.junit.Assert.assertTrue(Assert.java:43)
> 	at org.junit.Assert.assertFalse(Assert.java:68)
> 	at org.junit.Assert.assertFalse(Assert.java:79)
> 	at org.apache.jackrabbit.oak.jcr.observation.ObservationTest.observationDispose(ObservationTest.java:352)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.junit.runners.Suite.runChild(Suite.java:24)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:695)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message