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

Bug 367700

Summary: [Unit Test Failure][Ignored] org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.NatTableUITests.testOpenLoadCustomizationDialog
Product: z_Archived Reporter: Gregoire Dupe <gdupe>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P5 CC: emft.facet-inbox, gdupe
Version: unspecifiedFlags: gdupe: kepler+
gdupe: luna+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gregoire Dupe CLA 2012-01-02 04:31:54 EST
This unit test is failing with hudson and with my computer but not with the same error:

with hudson:

test timed out after 30000 milliseconds

Stacktrace

java.lang.Exception: test timed out after 30000 milliseconds
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4331)
	at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.run(UIThreadRunnable.java:76)
	at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.syncExec(UIThreadRunnable.java:172)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.syncExec(AbstractSWTBot.java:503)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.notify(AbstractSWTBot.java:141)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.notify(AbstractSWTBot.java:129)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.notify(AbstractSWTBot.java:119)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotTree.notifySelect(SWTBotTree.java:285)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotTree.select(SWTBotTree.java:211)
	at org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.NatTableUITests.testOpenLoadCustomizationDialog(NatTableUITests.java:427)

my computer:

java.lang.AssertionError: expected:<33> but was:<34>
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.failNotEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:126)
	at org.junit.Assert.assertEquals(Assert.java:470)
	at org.junit.Assert.assertEquals(Assert.java:454)
	at org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.NatTableUITests.testOpenLoadCustomizationDialog(NatTableUITests.java:421)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28)
Comment 1 Gregoire Dupe CLA 2012-01-04 11:17:22 EST
Back to normal in https://hudson.eclipse.org/hudson/job/emffacet-nightly-3.8/60/

But no changes have been done.
Comment 2 Gregoire Dupe CLA 2012-01-04 11:18:43 EST
I've rewritten the test 'org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.NatTableUITests.testOpenLoadCustomizationDialog()' in the new class 'org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.Bug367700'

Committed revision 1457.
Comment 3 Gregoire Dupe CLA 2012-01-05 09:05:53 EST
The test 'testOpenLoadCustomizationDialog ' assert an impossible behavior: the referred facets must not be unloaded because we do not know if they have been explicitly loaded.

Further more, the use of 'org.eclipse.emf.facet.util.tests.swtbot.internal.exported.SWTBotUtils.waitUntilAssertListSize(int , List<?>)' looks to be a not so good choice. The use of 'org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetInternal.waitForResfreshJob() ' looks to be a better choice. That why I chosen to rewrite this test method. The re-write of the test method is stored in the class org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.Bug367700

To avoid any false positive I have disable (using the '@Ignore' tag) test method 'NatTableUITests.testOpenLoadCustomizationDialog(()'.

Committed revision 1460.
Comment 4 Gregoire Dupe CLA 2012-01-05 09:10:38 EST
The load of customization and the load of the facet referred by the customization is now merged in an only one command.

The unit test 'org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.swtbot.Bug367700.testOpenLoadCustomizationDialogStep4' should run properly.

Committed revision 1461.
Comment 5 Gregoire Dupe CLA 2012-01-05 09:58:33 EST
I've fixed the regression detected by org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.uithread.Bug345730CheckTableIntegrityOnOpeningRegularEditingDomain.checkTableIntegrityOnOpening and org.eclipse.emf.facet.widgets.table.tests.internal.v0_2.uithread.Bug345730CheckTableIntegrityOnOpeningTransactionalEditingDomain.checkTableIntegrityOnOpening.

Committed revision 1462.