| Summary: | BranchingTest.testDetachExisting() randomly fails with ObjectNotFoundException | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Cyril Jaquier <cyril.jaquier> | ||||||||||
| Component: | cdo.core | Assignee: | Martin Fluegge <martin.fluegge> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | martin.fluegge, stepper | ||||||||||
| Version: | 4.0 | Flags: | stepper:
review+
|
||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 313326 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Cyril Jaquier
As suggested by Eike, I tried to set several caches to strong references. No success so far. This bug only appears with [Combined, MEMBranches, JVM, Legacy]. I'm now able to reproduce the bug if I run the test alone. I also tried to add a few sleeps in the tests but it still fails. So I don't think it's a timing issue. Created attachment 172501 [details]
testDetachExisting output
Output of BranchingTest.testDetachExisting [Combined, MEMBranches, JVM, Legacy]
(In reply to comment #1) > This bug only appears with [Combined, MEMBranches, JVM, Legacy]. I'm now able > to reproduce the bug if I run the test alone. Just a note: You can run this test scenario with the launch config named "CDO AllTests (MEM legacy)" (In reply to comment #3) > (In reply to comment #1) > > This bug only appears with [Combined, MEMBranches, JVM, Legacy]. I'm now able > > to reproduce the bug if I run the test alone. > > Just a note: You can run this test scenario with the launch config named "CDO > AllTests (MEM legacy)" No because AllTestsMEMLegacy runs MEM but not MEMBranches. Created attachment 172717 [details]
Add MEMBranches scenario to AllTestsMEMLegacy
Maybe MEM_AUDIT should be added too. Or is this deprecated?
(In reply to comment #4) > > > This bug only appears with [Combined, MEMBranches, JVM, Legacy]. I'm now able > > > to reproduce the bug if I run the test alone. > > > > Just a note: You can run this test scenario with the launch config named "CDO > > AllTests (MEM legacy)" > > No because AllTestsMEMLegacy runs MEM but not MEMBranches. IIRC we wanted to let the legacy tests run with branching mode. Martin, should we fix this in the test suite? Honestly, I can't remember discussing this. But we should definitively test Legacy with branching. I tried to reproduce the Exception mentionend above but was not successful, neither on MEM nor on MEM_BRANCHES scenario. Rebasing all outstanding 3.0 problem reports to version 3.0.1 Not sure if it is related, but the same exception occurs in a few other tests as well: https://build.eclipse.org/hudson/job/emf-cdo-integration/532/ https://build.eclipse.org/hudson/job/emf-cdo-integration/534/ Note that in these builds/tests it also occurs in NON-legacy tests ;-( Created attachment 173377 [details]
Test v1
Eike, I'm not sure whether the error of this bugzilla and the ones in the frozen builds are the same, because the stack traces do not match.
But I noticed that currently Bugzilla_313326_Test fails with the same exception as in the builds. I tried this locally and was first able to reproduce in about 5% of the runs.
By changing the test a bit (see patch) it becomes always reproducible. I think the meaning of the test logic remains. So it could be a timing issue?
Just a rough guess. Need to look at it in more detail.
Fixing wrong bug version. Renamed bugzilla since it does not only occur in legacy mode. I looked at this topic again and after re-enabling the method it turned out that it now fails reproducible in all Branching scenarios. So branching is the problem for this test. And it does not fail with an ObjectNotFoundException but fails on a check (see stack trace). Could anyone please confirm that the ONFE does not occurs anymore? junit.framework.AssertionFailedError: expected:<2> but was:<1> at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.failNotEquals(Assert.java:283) at junit.framework.Assert.assertEquals(Assert.java:64) at junit.framework.Assert.assertEquals(Assert.java:195) at junit.framework.Assert.assertEquals(Assert.java:201) at org.eclipse.emf.cdo.tests.BranchingTest.check(BranchingTest.java:664) at org.eclipse.emf.cdo.tests.BranchingTest.testDetachExisting(BranchingTest.java:646) 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:585) at junit.framework.TestCase.runTest(TestCase.java:168) at org.eclipse.net4j.util.tests.AbstractOMTest.runBare(AbstractOMTest.java:200) at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:467) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at org.eclipse.net4j.util.tests.AbstractOMTest.run(AbstractOMTest.java:246) at junit.framework.TestSuite.runTest(TestSuite.java:232) at org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWrapper.runTest(ConfigTestSuite.java:126) at junit.framework.TestSuite.run(TestSuite.java:227) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) No failures here or on Hudson. The method is renamed to BranchingTest._testDetachExisting(). You need to remove the underscore to make it run ;) Created attachment 196274 [details]
Test v2
After having a closer look to the test I think that this problem is simple a matter of a wrong assumption about the state of the test.
On the third commit the *OrderDetail* was removed from the resource, so assuming that the resource contains two objects on commitTimeStamp3 seems to be wrong.
I attached a patch which fixes this.
Any idea why that could make the test *randomly* fail or pass? > Any idea why that could make the test randomly fail or pass?
Actually not. But I couldn't reproduce the randomness of the failing (oh, that sounds strange). When I started again working on this one it failed every time.
Committed revision 7826: - trunk/plugins/org.eclipse.emf.cdo.tests Committed revision 7826 Because this cannot be reproduced I close this one. Please re-open if necessary. Resolved Fixed. Note: It could be that this random problem was the same or similar to the one we've fixed in bug 346477. Moving all open problem reports to 4.0 Closing. |