Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337222

Summary: ClassCastException in some tests
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: minor    
Priority: P3 CC: caspar_d
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eike Stepper CLA 2011-02-15 10:06:43 EST
-- Error Log from JUnit --
Class: org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_319552_Test
Method: test
Actual: null
Expected: null
Stack Trace:
org.eclipse.emf.cdo.tests.config.impl.ConfigTestException: Error in Bugzilla_319552_Test.test [Combined, MEMBranches, TCP, Native]
	at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:476)
	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 junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	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: java.lang.ClassCastException: org.eclipse.emf.cdo.internal.server.Repository$Default cannot be cast to org.eclipse.emf.cdo.spi.server.InternalSynchronizableRepository
	at org.eclipse.emf.cdo.tests.AbstractSyncingTest.getRepository(AbstractSyncingTest.java:67)
	at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_319552_Test.test(Bugzilla_319552_Test.java:40)
	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 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)
	... 14 more
Comment 1 Eike Stepper CLA 2011-02-15 10:10:45 EST
I think this is because I've accidentally added some tests (all that derive from AbstractSyncingTest) to AllConfigs that don't belong into normal scenarios. They're really meant to be included into replication scenarios only. This happened because recently I tried to find tests that are missing from the suite and just added them.

Now I'm moving all these special tests into the "offline" tests package...
Comment 2 Eike Stepper CLA 2011-02-15 10:11:31 EST
Committed revision 7082:
- trunk/plugins/org.eclipse.emf.cdo.tests
- trunk/plugins/org.eclipse.emf.cdo.tests.db
Comment 3 Eike Stepper CLA 2011-02-15 10:11:53 EST
Resolved
Comment 4 Eike Stepper CLA 2011-06-23 03:42:27 EDT
Available in R20110608-1407