Community
Participate
Working Groups
org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest.testIDFactoryAddNamespace Error Message Expected: <null> but was: Namespace[name=org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest;scheme=org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest;description=] Stacktrace junit.framework.AssertionFailedError: Expected: <null> but was: Namespace[name=org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest;scheme=org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest;description=] at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNull(Assert.java:233) at junit.framework.Assert.assertNull(Assert.java:226) at org.eclipse.ecf.tests.core.identity.IDFactoryServiceTest.testIDFactoryAddNamespace(IDFactoryServiceTest.java:76) 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 junit.framework.TestCase.runBare(TestCase.java:134) 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 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.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:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at org.junit.runner.JUnitCore.run(JUnitCore.java:136) at org.pluginbuilder.autotestsuite.junit4.JUnit4TestRunner.runTests(JUnit4TestRunner.java:71) at org.pluginbuilder.autotestsuite.junit4.JUnit4TestRunner.runFormatterTests(JUnit4TestRunner.java:54) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runFormatterTests(AutoTestApplication.java:294) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnit4Tests(AutoTestApplication.java:271) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnitTestsOnUIThread(AutoTestApplication.java:176) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runHeadless(AutoTestApplication.java:159) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.run(AutoTestApplication.java:96) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.start(AutoTestApplication.java:69) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) org.eclipse.ecf.tests.core.identity.IDFactoryTest.testIDFactoryAddNamespace Error Message Expected: <null> but was: Namespace[name=org.eclipse.ecf.tests.core.identity.IDFactoryTest;scheme=org.eclipse.ecf.tests.core.identity.IDFactoryTest;description=] Stacktrace junit.framework.AssertionFailedError: Expected: <null> but was: Namespace[name=org.eclipse.ecf.tests.core.identity.IDFactoryTest;scheme=org.eclipse.ecf.tests.core.identity.IDFactoryTest;description=] at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNull(Assert.java:233) at junit.framework.Assert.assertNull(Assert.java:226) at org.eclipse.ecf.tests.core.identity.IDFactoryTest.testIDFactoryAddNamespace(IDFactoryTest.java:76) 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 junit.framework.TestCase.runBare(TestCase.java:134) 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 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.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:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at org.junit.runner.JUnitCore.run(JUnitCore.java:136) at org.pluginbuilder.autotestsuite.junit4.JUnit4TestRunner.runTests(JUnit4TestRunner.java:71) at org.pluginbuilder.autotestsuite.junit4.JUnit4TestRunner.runFormatterTests(JUnit4TestRunner.java:54) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runFormatterTests(AutoTestApplication.java:294) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnit4Tests(AutoTestApplication.java:271) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnitTestsOnUIThread(AutoTestApplication.java:176) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runHeadless(AutoTestApplication.java:159) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.run(AutoTestApplication.java:96) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.start(AutoTestApplication.java:69) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383
Markus, are you going to fix this? On casual examination this looks to be a bug in the test code (it assumes something about the IDFactory that isn't true in some environments). An easy fix would be to remove the added Namespace in the test code.
The root cause lies in the automated test suite [0]. It executes all tests twice (one time with junit3, a second time with junit4). [0] http://www.pluginbuilder.org/
(In reply to comment #2) > The root cause lies in the automated test suite [0]. It executes all tests > twice (one time with junit3, a second time with junit4). > > [0] http://www.pluginbuilder.org/ I suggest that for this bug, we fix the test code so that it is not environment dependent. In general, tests should be environment dependent anyway...to avoid the very situation we are seeing...test success in most environments but not in automated testing. But if a bug exists in pluginbuilder...or our usage for the automated tests...then let's open something against plugin builder...or open a bug against ECF releng...or both...whatever is appropriate. I'll take this...and fix the test, and resolve.
(In reply to comment #3) <stuff deleted> > dependent. In general, tests should be environment dependent anyway...to avoid of course I meant 'should *not* be environment dependent...'
(In reply to comment #1) > Markus, are you going to fix this? On casual examination this looks to be a > bug in the test code (it assumes something about the IDFactory that isn't true > in some environments). An easy fix would be to remove the added Namespace in > the test code. Making the tests idempotent would fix this issue.
(In reply to comment #5) > (In reply to comment #1) > > Markus, are you going to fix this? On casual examination this looks to be a > > bug in the test code (it assumes something about the IDFactory that isn't true > > in some environments). An easy fix would be to remove the added Namespace in > > the test code. > > Making the tests idempotent would fix this issue. Fix pushed to master. Resolving.
You missed IDFactoryServiceTest. It is to ~90% identical to IDFactoryTest, thus I have extracted a common abstract superclass and move all identical methods.