DESCRIPTION

Bug 443094 - [CSS]Move org.eclipse.e4.ui.tests.css.swt tests to JUnit4

Change-Id: I74acd6cfd929c019279c6f4afb9df9261bf60b7a
Signed-off-by: Averie Phelps xxx@xxx.xxx


COMMENTS

author: Averie Phelps
date: 2014-11-11 14:39:25.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-11-11 14:39:31.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/3711/

-------------------------------------
author: Brenden Conley
date: 2014-11-11 14:54:55.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/3711/ : SUCCESS

-------------------------------------
author: Krista Shepherd
date: 2014-11-11 16:11:22.000000000

Patch Set 1:

(8 comments)

Thank you Thibault. Please see the inline comments. Only some minor suggestions.

Line:2, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/CTabItemTest.java -> Usually we would only write "Copyright (c) 2009, 2014 Remy Chi Jian Suen and others." and avoid too many year references.

Line:2, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/IdClassLabelColorTest.java -> Here also "2008, 2014" would also be sufficient.

Line:2, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/ButtonTest.java -> Usually we would only write "Copyright (c) 2008, 2014 IBM Corporation..." and avoid too many year references.

Line:2, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/GradientTest.java -> Here also "2009, 2014" would also be sufficient.

Line:181, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/GradientTest.java -> I think this empty lines may be removed

Line:49, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/CSSSWTWidgetTest.java -> I would also add xxx@xxx.xxx to the method here

Line:56, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/CssSwtTestSuite.java -> We should also add the ShellActiveTest class to the TestSuite, because you already xxx@xxx.xxx bug #273582") to the ShellActiveTest class.

Line:9, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/CssSwtTestSuite.java -> You may also add your name too: "Averie Phelps xxx@xxx.xxx - Bug 443094"

-------------------------------------
author: Krista Shepherd
date: 2014-11-11 16:29:31.000000000

Patch Set 1:

Unfortunately a "No more handles" error is thrown when running the tests: 

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
	at org.eclipse.swt.SWT.error(SWT.java:4483)
	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:934)
	at org.eclipse.swt.widgets.Display.create(Display.java:918)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:157)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:514)

Therefore we also have to have a look at the system resources, which do not seem to be disposed after the tests.

-------------------------------------
author: Averie Phelps
date: 2014-11-11 16:33:48.000000000

Patch Set 1:

Hey Nevaeh Wu, 

They run great on osX from the test.launch but i can trigger them with a maven build they dont run. 

Though i'm going to check all the system ressource are correctly dispose. 

Thanks for your comment and I will update an improved patch set really soon

-------------------------------------
author: Averie Phelps
date: 2014-11-17 21:54:40.000000000

Patch Set 1:

Hey Nevaeh Wu, 

Im looking for the swt leak, do you have the full stack trace , it could be helpful.

Thibault

-------------------------------------
author: Krista Shepherd
date: 2014-11-18 13:16:49.000000000

Patch Set 1:

Hello Thibault,

the problem with those "no more handles" exception is the fact, that the stacktrace in general is useless, because it must not be the place where the leak happens.
No more handles just means that too many system resources are allocated and therefore it can happen everywhere.Even if the system resource is allocated in a correct manner.

Sorry, but we must have a look at every system resource usage/allocation and check whether the resources are disposed correctly or not.

-------------------------------------
author: Averie Phelps
date: 2014-11-18 13:36:53.000000000

Patch Set 1:

Ok i have refactored a bit the test to properly set up the display in a before method and to dispose it in a "after"method 

Will push it tonight 

hopefully it works, but it runs fine on osX

-------------------------------------
