Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337886 - [Legacy] Bugzilla_305527_Test.testAvoidReferencingDifferentViews() fails in Legacy
Summary: [Legacy] Bugzilla_305527_Test.testAvoidReferencingDifferentViews() fails in L...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.legacy (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 14:21 EST by Martin Fluegge CLA
Modified: 2012-09-21 06:52 EDT (History)
0 users

See Also:
stepper: review+


Attachments
Patch v1 (5.11 KB, patch)
2011-05-21 14:35 EDT, Martin Fluegge CLA
no flags Details | Diff
Patch v2 (4.54 KB, patch)
2011-05-21 14:38 EDT, Martin Fluegge CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fluegge CLA 2011-02-22 14:21:44 EST
This test cases fails in Legacy after the correct MangoPackge and Factory were created with Bug 335669.

junit.framework.AssertionFailedError: IllegalArgumentException expected
	at junit.framework.Assert.fail(Assert.java:47)
	at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_305527_Test.testAvoidReferencingDifferentViews(Bugzilla_305527_Test.java:68)
	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:214)
	at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:473)
	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:260)
	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)
Comment 1 Martin Fluegge CLA 2011-05-21 14:35:54 EDT
Created attachment 196275 [details]
Patch v1

It turned out that the AbstractCDOView simply swallowed the exception in case of a legacy object. I removed this try/catch since it does not seem to useful. Since all tests are passing I guess that this was added for some historical reasons.

Added a patch to fix this which also re-enables the test.
Comment 2 Martin Fluegge CLA 2011-05-21 14:38:00 EDT
Created attachment 196276 [details]
Patch v2

Patch v2 contained a bug. Attached Patch v2
Comment 3 Eike Stepper CLA 2011-07-08 10:39:33 EDT
Please always set the bug state to ASSIGNED when you start working on it.
Attaching a patch is always a good indication that work has started :P
Comment 4 Martin Fluegge CLA 2011-07-12 12:46:22 EDT
Committed revision 8679
Comment 5 Eike Stepper CLA 2012-09-21 06:52:09 EDT
Closing.