[jbosstools-issues] [JBoss JIRA] (JBIDE-17591) org.jboss.tools.common.el.core.test fails on Max OS X Mavericks

Viacheslav Kabanovich (JIRA) issues at jboss.org
Fri Jun 13 19:45:38 EDT 2014


    [ https://issues.jboss.org/browse/JBIDE-17591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976250#comment-12976250 ] 

Viacheslav Kabanovich commented on JBIDE-17591:
-----------------------------------------------

File .classpath in Java projects in org.jboss.tools.common.el.core.test has entry 
{code}
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
{code}
Can it be that on Max OS tests are run with Java 1.7? Then jre may not be found for these projects and class java.util.Set is not in the classpath. 

In testGenetic(), code
{code}
		String result = EclipseJavaUtil.resolveType(type, "List<String>");
		assertEquals("java.util.List", result);
{code}
passes, because List is found as matching import java.util.List.
Code 
{code}
		result = EclipseJavaUtil.resolveType(type, "Set<String>");
		assertEquals("java.util.Set", result);
{code}
fails because Set must be matched to import java.util.*, which is tested by looking up for class java.util.Set in the project. That can fail because jre 1.7 is used.

In most test projects .classpath declares entry
{code}
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
{code}
not specifying Java version.
[~dazarov], [~dgolovin] could you please check that on Max OS?

Anyway, it would be consistent to remove Java version from entries in .classpath in test projects that still specify it.

> org.jboss.tools.common.el.core.test fails on Max OS X Mavericks
> ---------------------------------------------------------------
>
>                 Key: JBIDE-17591
>                 URL: https://issues.jboss.org/browse/JBIDE-17591
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core
>    Affects Versions: 4.2.0.Beta2
>         Environment: Mac OS X Mavericks
>            Reporter: Denis Golovin
>            Assignee: Daniel Azarov
>             Fix For: 4.2.0.Beta3
>
>         Attachments: org.jboss.tools.common.el.core.test.CommonELAllTests2.txt
>
>
> {code}junit.framework.AssertionFailedError
> 	at junit.framework.Assert.fail(Assert.java:55)
> 	at junit.framework.Assert.assertTrue(Assert.java:22)
> 	at junit.framework.Assert.assertNotNull(Assert.java:256)
> 	at junit.framework.Assert.assertNotNull(Assert.java:248)
> 	at junit.framework.TestCase.assertNotNull(TestCase.java:417)
> 	at org.jboss.tools.common.el.core.test.resolver.TypeInfoCollectorTest.testTypeResolution(TypeInfoCollectorTest.java:68)
> 	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:601)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at junit.framework.TestCase.runBare(TestCase.java:141)
> 	at junit.framework.TestResult$1.protect(TestResult.java:122)
> 	at junit.framework.TestResult.runProtected(TestResult.java:142)
> 	at junit.framework.TestResult.run(TestResult.java:125)
> 	at junit.framework.TestCase.run(TestCase.java:129)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255)
> 	at junit.framework.TestSuite.run(TestSuite.java:250)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255)
> 	at junit.framework.TestSuite.run(TestSuite.java:250)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
> 	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:601)
> 	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
> 	at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:86)
> 	at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
> 	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:601)
> 	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:379)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:233)
> 	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:601)
> 	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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jbosstools-issues mailing list