Community
Participate
Working Groups
This issue has been described in the following post http://www.eclipse.org/forums/index.php/t/244583/ .
Created attachment 204584 [details] bug359966 test TestCase in attachment. To integrate the test : 1. Import the zip file of ticket 352204 https://bugs.eclipse.org/bugs/attachment.cgi?id=203829 2. Apply the bug359966 test patch Launch the "CDO AllTests (MEM legacy)" launch config. One test will fail, 2 will raise errors (Failing event PREPARE in state CLEAN). This can be explained by https://bugs.eclipse.org/bugs/show_bug.cgi?id=352204. It is interesting to notice that when using CDOPushTransactions with default File, this issue is not raised. 3. Apply the CDOStateMachine fork The 3 tests will fail.
Created attachment 204585 [details] CDOStateMachine fork the fork that allows to avoid issue described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=352204
I've identified the root cause: In CDOTransactionImpl.importChanges() there was a call to object.cdoInternalPostLoad() missing for new objects. That caused the revision data from the input stream not being transferred into the legacy object. Writing more tests to see if that's all...
This is more a PushTransaction than legacy mode issue.
Now addressing the problem of temp ID mapping during import: org.eclipse.emf.cdo.tests.config.impl.ConfigTestException: Error in TransactionTest.testPushModeNewObjects [Combined, MEM, JVM, Legacy] at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:535) 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:264) at junit.framework.TestSuite.runTest(TestSuite.java:243) at org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWrapper.runTest(ConfigTestSuite.java:119) at junit.framework.TestSuite.run(TestSuite.java:238) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) 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) Caused by: org.eclipse.emf.cdo.util.ObjectNotFoundException: Object oid2 not found in branch 0 at * at org.eclipse.emf.internal.cdo.view.AbstractCDOView.excludeNewObject(AbstractCDOView.java:728) at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:705) at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1068) at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1) at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.getEObjectFromPotentialID(CDOLegacyWrapper.java:703) at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.revisionToInstanceContainer(CDOLegacyWrapper.java:425) at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.revisionToInstance(CDOLegacyWrapper.java:387) at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.cdoInternalPostLoad(CDOLegacyWrapper.java:278) at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.importChanges(CDOTransactionImpl.java:1920) at org.eclipse.emf.cdo.transaction.CDOPushTransaction.<init>(CDOPushTransaction.java:143) at org.eclipse.emf.cdo.transaction.CDOPushTransaction.<init>(CDOPushTransaction.java:115) at org.eclipse.emf.cdo.tests.TransactionTest.testPushModeNewObjects(TransactionTest.java:268) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:168) at org.eclipse.net4j.util.tests.AbstractOMTest.runBare(AbstractOMTest.java:218) at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:526) ... 18 more
commit 5ad3b529cc56776cfb29bd4d43a6487bf9b837d4 Author: Eike Stepper <stepper@esc-net.de> 2011-11-22 11:54:52 Committer: Eike Stepper <stepper@esc-net.de> 2011-11-22 11:54:52 Parent: 40df8b0447094c2c55b11011fdedc1bab7e90a7a (fixed deprecation warnings in Eclipse 3.8) Branches: master [359966] Issues when trying to import changes from PushTransaction in legacy mode https://bugs.eclipse.org/bugs/show_bug.cgi?id=359966 Test model + tests
Now bug 352204 bites me ;-(
Disabling the two test cases that fail for bug 352204 for now.
commit 57cbcc66f376e0bd6a13d05d580b46e022393b5d Author: Eike Stepper <stepper@esc-net.de> 2011-11-23 07:06:15 Committer: Eike Stepper <stepper@esc-net.de> 2011-11-23 07:06:15 Parent: 29772285ab4fbc187af24af29effb0dfb311e814 ("long=long*int" instead of "long=int*long") Branches: master [359966] Issues when trying to import changes from PushTransaction in legacy mode https://bugs.eclipse.org/bugs/show_bug.cgi?id=359966
Please note that existing push tx files are no longer valid with this fix!
Created attachment 207400 [details] An object diagram to explain the test scenario
Maintenance fix via bug 364536
Closing.