Community
Participate
Working Groups
junit.framework.AssertionFailedError: expected:<1> but was:<0> at org.eclipse.ui.tests.keys.BindingPersistenceTest.testBindingTransform(BindingPersistenceTest.java:210) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:501) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:259) at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140) at org.eclipse.test.UITestApplication.run(UITestApplication.java:62) at org.eclipse.test.UITestApplication.start(UITestApplication.java:212) 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:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579) at org.eclipse.equinox.launcher.Main.run(Main.java:1431) at org.eclipse.equinox.launcher.Main.main(Main.java:1407) at org.eclipse.core.launcher.Main.main(Main.java:34)
It also failed in I20110927-0800.
Also on N20110927-2000. The problem does not appear to occur if only BindingPersistenceTest is run.
I went back to c5dda97ca5c5e9227bb026c9fb5682ec1de4b88c from the end of August and can still reproduce the problem when I run the whole test suite. Not quite sure what's going on yet. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=c5dda97ca5c5e9227bb026c9fb5682ec1de4b88c
When it fails in the debugger, it seems like the binding manager's map of active bindings is an empty map.
Tried asking the binding service to reread the registry in an attempt to repopulate the map but it didn't seem to do it.
Failed even when I checked out the R3_7 tag from Git and ran the tests with 3.7.0 on Windows XP. -_-
(In reply to comment #6) > Failed even when I checked out the R3_7 tag from Git and ran the tests with > 3.7.0 on Windows XP. -_- The test fails constantly since about a week and since it also fails with 3.7 I suspect that recent changes in another bundle are causing this. Other (less) possible issue: you use a different JRE.
(In reply to comment #7) > The test fails constantly since about a week and since it also fails with 3.7 I > suspect that recent changes in another bundle are causing this. Other (less) > possible issue: you use a different JRE. I made a fresh clone and unzipped a new 3.7.0. Tried running the tests a few times with Java 7 and Java 6 and it passed once in like eight tries (the pass was on Java 6). Dani, how do you suggest I proceed?
Looks like now it fails more consistently. I guess the only thing is to really debug the issue.
Too bad we don't have 3.7.x builds going yet as it would be helpful to know if the test fails for our maintenance builds or not.
You said that it only happens when when running all tests. I would look for tests that got added in the past one or two weeks. Maybe they cause this by a side effect.
(In reply to comment #11) > You said that it only happens when when running all tests. I would look for > tests that got added in the past one or two weeks. Maybe they cause this by a > side effect. Some new tests were added but they were for the JFace and databinding test suite. Based on some print statements and repeated runs of the test suite, it seems that when the test passes the binding manager ends up recomputing its bindings a couple of times when BindingPersistenceTest's testAutoLoad test is run. When the test fails, no binding recomputation is being performed.
Activating some contexts seems to be ensuring that the bindings are in the manager and retrievable. Worked for a couple of runs on 3.7.0. Trying now on my regular 3.x workspace against 3.8.
(In reply to comment #13) > Activating some contexts seems to be ensuring that the bindings are in the > manager and retrievable. Worked for a couple of runs on 3.7.0. Trying now on my > regular 3.x workspace against 3.8. I've pushed the change to R3_development. Let's see what happens tonight... http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=d2f8ee873eaa2754b7ebbd90c389ddd1a0d3ee1d
Ha! It no longer failed in N20111004-2000 but on Linux we now got the following test failure (no idea whether this is related to this fix). Adaptable test 1 has failed for object org.eclipse.ui.tests.menus.ObjectContributionClasses$C@b725bd junit.framework.AssertionFailedError: Adaptable test 1 has failed for object org.eclipse.ui.tests.menus.ObjectContributionClasses$C@b725bd at org.eclipse.ui.tests.decorators.DecoratorAdaptableTests.assertDecorated(DecoratorAdaptableTests.java:56) at org.eclipse.ui.tests.decorators.DecoratorAdaptableTests.testAdaptables(DecoratorAdaptableTests.java:84) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:501) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:259) at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140) at org.eclipse.test.UITestApplication.run(UITestApplication.java:62) at org.eclipse.test.UITestApplication.start(UITestApplication.java:212) 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:352) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579) at org.eclipse.equinox.launcher.Main.run(Main.java:1431) at org.eclipse.equinox.launcher.Main.main(Main.java:1407) at org.eclipse.core.launcher.Main.main(Main.java:34)
(In reply to comment #15) > Ha! It no longer failed in N20111004-2000 but on Linux we now got the following > test failure (no idea whether this is related to this fix). > > Adaptable test 1 has failed for object > org.eclipse.ui.tests.menus.ObjectContributionClasses$C@b725bd > > junit.framework.AssertionFailedError: Adaptable test 1 has failed for object > org.eclipse.ui.tests.menus.ObjectContributionClasses$C@b725bd > at > org.eclipse.ui.tests.decorators.DecoratorAdaptableTests.assertDecorated(DecoratorAdaptableTests.java:56) > at > org.eclipse.ui.tests.decorators.DecoratorAdaptableTests.testAdaptables(DecoratorAdaptableTests.java:84) Not likely because the DecoratorsTestSuite is added to the test suite before the KeysTestSuite. So assuming JUnit isn't broken and is running them sequentially then changes in a later test suite shouldn't affect something before.
This test hasn't failed in a while and is looking good in this week's I builds. Marking as VERIFIED.
The fix did not make it into master. Cherry-picked now: 43e6123882e908156ced6daa2edbc52197c56f73