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-18 22:40:16.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-11-18 22:53:24.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2014-11-18 23:15:19.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Krista Shepherd
date: 2014-11-21 10:40:20.000000000

Patch Set 3:

(1 comment)

Please see my inline comment. But even, if I change this class and dispose the colors I run into a "No more handles" SWTException :(

I'll try to make further tests on my maschine.

Line:36, tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/css/swt/helpers/CSSSWTColorHelperTest.java -> In this class all colors which are created, are not disposed at the end.

-------------------------------------
author: Zaid Mosley
date: 2014-11-21 12:19:22.000000000

Patch Set 3:

Nevaeh Wu are you using the default launch configuration? 
"No more handles" SWTException typically happens if these launch configurations contain a Display setting. The Platform.ui team used to set these sometimes in the past. We should remove them if you find them.

-------------------------------------
author: Averie Phelps
date: 2014-11-21 12:39:11.000000000

Patch Set 3:

(1 comment)

Line:32, tests/org.eclipse.e4.ui.tests.css.swt/CSS SWT Test Suite.launch -> Nevaeh Wu this could be the solution of the ' no more handle' issue according to Lars comment,  Since im on osx and i can hardly run them withouth this.

-------------------------------------
author: Krista Shepherd
date: 2014-11-21 12:54:05.000000000

Patch Set 3:

(1 comment)

After resolving the issue with the "No more handles" SWTException, I got the following Exception, due to xxx@xxx.xxx annotations in the InheritTest class:

java.lang.Exception: No runnable methods
	at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:169)
	at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:104)
	at org.junit.runners.ParentRunner.validate(ParentRunner.java:355)
	at org.junit.runners.ParentRunner.<init>(ParentRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:57)
	at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
	at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
	at org.junit.runners.Suite.<init>(Suite.java:101)
	at org.junit.runners.Suite.<init>(Suite.java:69)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:33)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
	at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

Have you used the https://github.com/Nevaeh WuScholz/codemodify plugin here? Usually this plugin should have added xxx@xxx.xxx annotations automatically.

Line:26, tests/org.eclipse.e4.ui.tests.css.swt/CSS SWT Test Suite.launch -> After I removed this "<mapEntry key="DISPLAY" value=":1.0"/>" the no more handles exception does not occur any more.

-------------------------------------
author: Averie Phelps
date: 2014-11-21 13:01:32.000000000

Patch Set 3:

Hey Nevaeh Wu, 


It's all my fault 

I did, but when i rebased patch3 to push it gerrit i forget to add xxx@xxx.xxx annotation to inheritTest.cass class 

tonight i will : 

Properly dispose the color 
Add the Annotation 
Correct the launcher 

Sorry for that, it will be ok aftermath, wont be ?

-------------------------------------
author: Krista Shepherd
date: 2014-11-21 13:08:37.000000000

Patch Set 3:

Hello Thibault,

First of all don't be sorry. We really appreciate your work and are thankful for it.

I just ran my JUnit 4 converter on the InheritTest class class and now everything works fine.

Looking forward to the last patch :)

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