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

Bug 352960

Summary: [Build] Build time out and bug345730Test error
Product: z_Archived Reporter: Gregoire Dupe <gdupe>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: emft.facet-inbox
Version: unspecifiedFlags: gdupe: indigo+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 345730    
Bug Blocks:    

Description Gregoire Dupe CLA 2011-07-24 17:40:47 EDT
Hello,

The build of EMF Facet is broken. Here is the error message:

Testcase: bug345730Test took 1.047 sec
	Caused an ERROR

java.lang.AssertionError: 
	at org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test(Bug345730Test.java:220)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:350)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:208)
	at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication.runTests(UITestApplication.java:116)
	at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
	at java.lang.Thread.run(Thread.java:595)

Build timed out. Aborting


Here are the last changes :

#364 (22 juil. 2011 14:44:04)

    Bug 345730 - Deleting an element in the model breaks the table
    Bug fix. — gdupe / détail
    Bug 345730 - Deleting an element in the model breaks the table
    Initial import of org.eclipse.emf.facet.widgets.nattable.instance.edit — gdupe / détail
    Bug 345730 - Deleting an element in the model breaks the table
    Initial import of org.eclipse.emf.facet.widgets.nattable.instance.edit — gdupe / détail

#363 (29 juin 2011 09:22:29)

    Bug 350700 - TableWidget: Wrong cell label in multi-valued facet reference columns — gdupe / détail
Comment 1 Gregoire Dupe CLA 2011-07-24 17:45:20 EDT
To try to unlock the build, I've added the following method in the class org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.

@SuppressWarnings("static-method") //An @After junit method cannot be static.
@After
public void afterTests() {
	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	activePage.closeAllEditors(false);
}
Comment 2 Gregoire Dupe CLA 2011-07-24 18:06:16 EDT
New error:

Testcase: bug345730Test took 1.232 sec
	Caused an ERROR

java.lang.AssertionError: 
	at org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test(Bug345730Test.java:223)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:350)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:208)
	at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication.runTests(UITestApplication.java:116)
	at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
	at java.lang.Thread.run(Thread.java:595)

	Caused an ERROR
null
java.lang.NullPointerException
	at org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.afterTests(Bug345730Test.java:263)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:350)
	at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:208)
	at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication.runTests(UITestApplication.java:116)
	at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
	at java.lang.Thread.run(Thread.java:595)


I've added a syncExec into the afterTests method to avoid "PlatformUI.getWorkbench().getActiveWorkbenchWindow() == null"

Committed revision 732.

The build looks to be freezed. I'll restart it.
Comment 3 Gregoire Dupe CLA 2011-07-24 18:30:48 EDT
The time out has been solved.

We now have junit test errors.

    org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.widgets.nattable.tests.AllTests$org.eclipse.emf.facet.widgets.nattable.tests.Bug344413Test.testBug344413
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.tests.BundleTest.name
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.tests.BundleTest.provider
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.tests.BundleTest.version
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.tests.BundleTest.about

I expect to have fix the four last ones. cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=345730#c24

The error org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test is normal until the commit of the attachment 200210 [details], cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=345730#c23

The error org.eclipse.emf.facet.widgets.nattable.tests.Bug344413Test.testBug344413 is not expected. I'll wait the commit of the attachment 200210 [details] to continue to investigate.

I've re-launch a build.
Comment 4 Gregoire Dupe CLA 2011-07-24 18:54:00 EDT
Only two last errors:
     org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test
    org.eclipse.emf.facet.tests.AllTests$org.eclipse.emf.facet.widgets.nattable.tests.AllTests$org.eclipse.emf.facet.widgets.nattable.tests.Bug344413Test.testBug344413

Those errors have to be solved in the bug 345730.

Then, I reduce the importance of the bug to "normal".
Comment 5 Gregoire Dupe CLA 2011-08-22 11:34:31 EDT
The unit test org.eclipse.emf.facet.widgets.nattable.tests.Bug344413Test check that no column exists when the table is empty rather than the test org.eclipse.emf.facet.widgets.nattable.tests.Bug346465Test check that the 3 non feature columns are displayed.

I don’t understand why the problem has not been detected before.

In org.eclipse.emf.facet.widgets.nattable.internal.TableInstanceCommandFactory.createRemoveUselessColumnsCommand(TableInstance, List<Row>, ICommandFactory, EditingDomain), we can find the following comment : "// If there is no rows, then there should not be any column". This comment has been addeb by the 721 the June 14th 2011 at 16:05 in the fix of the bug Bug 346465.

Considering this, I will change the unit test Bug344413Test.
Comment 6 Gregoire Dupe CLA 2011-08-22 11:45:12 EDT
> Considering this, I will change the unit test Bug344413Test.

Done. (Committed revision 778.)

We still wait the commit of the bug 345730.
Comment 7 Gregoire Dupe CLA 2011-08-29 13:11:38 EDT
Since the final commit of the bug 345730 the unit test org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug345730Test.bug345730Test does not fails anymore.

This bug can then be marked has fixed.
Comment 8 Gregoire Dupe CLA 2012-05-23 07:06:17 EDT
This bug can be closed.