eclipse-qvto / org.eclipse.qvto

Eclipse Public License 2.0
0 stars 1 forks source link

Tests do not run #886

Open eclipse-qvt-oml-bot opened 3 days ago

eclipse-qvt-oml-bot commented 3 days ago

| --- | --- | | Bugzilla Link | 467981 | | Status | NEW | | Importance | P3 normal | | Reported | May 22, 2015 05:27 EDT | | Modified | May 22, 2015 11:22 EDT | | Reporter | Ed Willink |

Description

Attempting to run tests interactively does not given 100% green results.

Problem 1: org.eclipse.m2m.tests.qvt.oml.AllTests.launch specifies a Java 6 launch but uses Java 7 plugins. Fix for this accidentally included in

commit 79174b130b7e1ba3b7d1006e5f0294892e245b9d

Ditto the other launches.

Four tests fail, presumably becuase of inadequate initialization, unjustified workspace assmptions.

3 failures in QVT Interpreter from Ant:

org.eclipse.core.runtime.CoreException: E:\Development\Rusa\junit-workspace\QvtAntTest\models\simple\composite.xml:8: Problem: failed to create task or type qvto.interpretedTransformation\ Cause: The name is undefined.\ Action: Check the spelling.\ Action: Check that any custom tasks/types have been declared.\ Action: Check that any / declarations have taken place.

at org.eclipse.ant.core.AntRunner.handleInvocationTargetException(AntRunner.java:448)\
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:380)\
at org.eclipse.m2m.tests.qvt.oml.ant.TestQvtAntScript.runTest(TestQvtAntScript.java:61)\
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:252)\
at junit.framework.TestSuite.run(TestSuite.java:247)\
at junit.framework.TestSuite.runTest(TestSuite.java:252)\
at junit.framework.TestSuite.run(TestSuite.java:247)\
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)\
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\
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.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)\
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)\
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)\
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)\
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)\
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)\
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)\
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)\
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)\
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)\
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)\
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)\
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)\
at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47)\
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)\
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)\
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:669)\
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)\
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)\
at org.eclipse.equinox.launcher.Main.main(Main.java:1488)\

Caused by: E:\Development\Rusa\junit-workspace\QvtAntTest\models\simple\composite.xml:8: Problem: failed to create task or type qvto.interpretedTransformation\ Cause: The name is undefined.\ Action: Check the spelling.\ Action: Check that any custom tasks/types have been declared.\ Action: Check that any / declarations have taken place.

at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)\
at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)\
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)\
at org.apache.tools.ant.Task.perform(Task.java:347)\
at org.apache.tools.ant.Target.execute(Target.java:435)\
at org.apache.tools.ant.Target.performTasks(Target.java:456)\
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)\
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)\
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)\
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)\
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)\
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:705)\
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:527)\
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.ant.core.AntRunner.run(AntRunner.java:371)
... 46 more

--

1 in DeployedTransfProject

junit.framework.AssertionFailedError: expected:<0> but was:<4>\ at junit.framework.Assert.fail(Assert.java:57)\ at junit.framework.Assert.failNotEquals(Assert.java:329)\ at junit.framework.Assert.assertEquals(Assert.java:78)\ at junit.framework.Assert.assertEquals(Assert.java:234)\ at junit.framework.Assert.assertEquals(Assert.java:241)\ at junit.framework.TestCase.assertEquals(TestCase.java:409)\ at org.eclipse.m2m.tests.qvt.oml.callapi.SourceContainerTests$DeployedPluginText.runTest(SourceContainerTests.java:62)\ 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:252)\ at junit.framework.TestSuite.run(TestSuite.java:247)\ at junit.framework.TestSuite.runTest(TestSuite.java:252)\ at junit.framework.TestSuite.run(TestSuite.java:247)\ at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)\ at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\ 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.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)\ at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)\ at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)\ at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)\ at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)\ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)\ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)\ at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)\ at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)\ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)\ at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)\ at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)\ at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)\ at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:47)\ at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)\ at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)\ 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:669)\ at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)\ at org.eclipse.equinox.launcher.Main.run(Main.java:1515)\ at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

eclipse-qvt-oml-bot commented 3 days ago

By Sergey Boyko on May 22, 2015 10:09

(In reply to Ed Willink from comment #0)\

Four tests fail, presumably becuase of inadequate initialization, unjustified workspace assmptions.

3 failures in QVT Interpreter from Ant:

Ant library ('org.eclipse.m2m.qvt.oml.runtime\lib\antTasks.jar') is missing or old. Should be locally refereshed by means of 'org.eclipse.m2m.qvt.oml.runtime\post_build.xml'.

--

1 in DeployedTransfProject

junit.framework.AssertionFailedError: expected:<0> but was:<4> at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.failNotEquals(Assert.java:329) at junit.framework.Assert.assertEquals(Assert.java:78) at junit.framework.Assert.assertEquals(Assert.java:234) at junit.framework.Assert.assertEquals(Assert.java:241) at junit.framework.TestCase.assertEquals(TestCase.java:409) at org.eclipse.m2m.tests.qvt.oml.callapi. SourceContainerTests$DeployedPluginText.runTest(SourceContainerTests.java:62) 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:252) at junit.framework.TestSuite.run(TestSuite.java:247) at junit.framework.TestSuite.runTest(TestSuite.java:252) at junit.framework.TestSuite.run(TestSuite.java:247) at

That one should work without any prerequisites. \ Interesting that it is ok on Hudson and in my local workspace. Should be investigated further.

eclipse-qvt-oml-bot commented 3 days ago

By Ed Willink on May 22, 2015 11:22

(In reply to Sergey Boyko from comment #1)

Ant library ('org.eclipse.m2m.qvt.oml.runtime\lib\antTasks.jar') is missing or old. Should be locally refereshed by means of 'org.eclipse.m2m.qvt.oml.runtime\post_build.xml'.

Missing.

It would be good if the JUnit test tested for the presence of the library in order to give a good diagnostic.

There is no launch configuration for post_build.xml and Run As Ant Build fails for me. I recall that Ant has a Java 6/7 issue. Another reason for a saved launch.

Ah! there us an auto-builder. I suspect the problem is that it runs in the default Java 5 BREE which Ant no longer supports.\

junit.framework.AssertionFailedError: expected:<0> but was:<4>

at

That one should work without any prerequisites. Interesting that it is ok on Hudson and in my local workspace. Should be investigated further.

OK. I suspect that it is many unrequisites. If, just to take an example, the test result is dependent on the number of EPackages in the EPackage.Registry, then installing Papyrus might break the test. In similar circumstances I have had to write a separate routine to predict the correct result. More likely it is because OCL and QVTd contribute *.qvto files and/or .settings content.