[jbosstools-dev] Fwd: [jbosstools-commits] JBoss Tools SVN: r4799 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
Denis Golovin
dgolovin at exadel.com
Fri Nov 9 13:53:32 EST 2007
I'll roll that back, I hoped that it would help fix the JUnit errors,
but it didn't.
Max Rydahl Andersen wrote:
> On Fri, 09 Nov 2007 19:32:36 +0100, Denis Golovin
> <dgolovin at exadel.com> wrote:
>
>> Hi max,
>>
>> yes we shiouldn't reuse projects if there were modifications during
>> the test, but what ther reason to create new project before every
>> test is executed, it worked this way before:
>>
>> test.setUp();
>> test.test1()
>> test.tearDown()
>> test.setUp();
>> test.test2()
>> test.tearDown()
>> ...
>> test.setUp();
>> test.testN()
>> test.tearDown()
>
> None other than it was the best way to guarantee it was runing from a
> correct project and that creation/deletion could be done often.
>
>> now it works the same way, but project isn't created if it is already
>> there.
>> there is a problem, that it is not deleted at all, but we have an
>> issue about deleting projects
>> http://jira.jboss.org/jira/browse/JBIDE-1012
>
> This issue is windows specific - jars won't be locked under linux.
> but we need to figure out who is locking those jars - it is not
> hibernate during the tests.
>
>> I did it yesterday to looks how it works on hudson, because I always
>> have problems during tearDown() with deleting projects.
>>
>> I would say the better way is using TestSetup decorator, that start
>> setUp() and tearDown() only once for TestCase it should work for this
>> particular case and tests will be ran faster.
>
> sure - we just need to check that the tests is actually not dependent
> on them being deleted.
> The tests also create other resources than the projects that needs to
> be deleted..currently you disabled that deletion too.
>
>> Also I know that we have real problem with mozilla tests, it just
>> wont work.
>> look at error log for JUnit tests below, that happens all the time
>> for mozilla tests. I will look at it today on linux.
>
> That looks like a NPE that is causing the vm to exit...Seen that many
> times in the various VPE jira reports - I hoped that was only under
> the old JNI code ...apparently it is not ;(
>
> /max
>
>>
>> eclipse-test:
>> [java] !SESSION 2007-11-08 19:52:02.216
>> -----------------------------------------------
>> [java] eclipse.buildId=M20070921-1145
>> [java] java.version=1.5.0_12
>> [java] java.vendor=Sun Microsystems Inc.
>> [java] BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>> [java] Framework arguments: -application
>> org.eclipse.test.uitestapplication
>> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests.xml
>> -testPluginName org.jboss.tools.jsf.vpe.richfaces.test -classname
>> org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests
>> [java] Command-line arguments: -application
>> org.eclipse.test.uitestapplication -dev bin -data
>> /home/hudson/jbosstools-build/200711081857-nightly/tests/workspace
>> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests.xml
>> -testPluginName org.jboss.tools.jsf.vpe.richfaces.test -classname
>> org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests -consolelog
>>
>> [java] !ENTRY org.eclipse.wst.internet.cache 1 0 2007-11-08
>> 19:52:42.854
>> [java] !MESSAGE wtp.autotest.noninteractive is set. Licenses
>> dialogs will not be displayed.
>>
>> [java] !ENTRY org.eclipse.wst.sse.ui 4 4 2007-11-08 19:52:50.430
>> [java] !MESSAGE problem with reconciling
>> [java] !STACK 0
>> [java] java.lang.NullPointerException
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorStrategy.reconcile(ValidatorStrategy.java:205)
>>
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor.process(DocumentRegionProcessor.java:183)
>>
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor.process(StructuredRegionProcessor.java:252)
>>
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor.run(DirtyRegionProcessor.java:633)
>>
>> [java] at
>> org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>> [java] !ENTRY org.eclipse.core.jobs 4 2 2007-11-08 19:52:50.597
>> [java] !MESSAGE An internal error occurred during: "Processing
>> Dirty Regions".
>> [java] !STACK 0
>> [java] java.lang.NullPointerException
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorStrategy.endProcessing(ValidatorStrategy.java:140)
>>
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor.endProcessing(DocumentRegionProcessor.java:71)
>>
>> [java] at
>> org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor.run(DirtyRegionProcessor.java:647)
>>
>> [java] at
>> org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> [java] #
>> [java] # An unexpected error has been detected by HotSpot
>> Virtual Machine:
>> [java] #
>> [java] # SIGSEGV (0xb) at pc=0xc844aff4, pid=14079, tid=4160620224
>> [java] #
>> [java] # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed
>> mode)
>> [java] # Problematic frame:
>> [java] # C [libexpat.so.0+0xeff4]
>> [java] #
>> [java] # An error report file with more information is saved as
>> hs_err_pid14079.log
>> [java] #
>> [java] # If you would like to submit a bug report, please visit:
>> [java] # http://java.sun.com/webapps/bugreport/crash.jsp
>> [java] #
>> [java] Java Result: 134
>> [echo] Cleaning test workspace...
>> [delete] Deleting 412 files from
>> /home/hudson/jbosstools-build/200711081857-nightly/tests/workspace
>> [delete] Deleted 222 directories from
>> /home/hudson/jbosstools-build/200711081857-nightly/tests/workspace
>> [echo] performing "core" test on plugin "org.jboss.tools.tests"
>> class "org.jboss.tools.tests.ToolsAllTests"
>>
>>
>>
>>
>> Max Rydahl Andersen wrote:
>>> hi Denis,
>>>
>>> This is a broken fix - we shouldn't reuse the projects since they
>>> can be different.
>>>
>>> Why can't the project be deleted ? That works fine here...
>>>
>>> /max
>>>
>>>
>>> ------- Forwarded message -------
>>> From: jbosstools-commits at lists.jboss.org
>>> To: jbosstools-commits at lists.jboss.org
>>> Cc:
>>> Subject: [jbosstools-commits] JBoss Tools SVN: r4799 -
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
>>> Date: Thu, 08 Nov 2007 22:02:59 +0100
>>>
>>> Author: dgolovin
>>> Date: 2007-11-08 16:02:59 -0500 (Thu, 08 Nov 2007)
>>> New Revision: 4799
>>>
>>> Modified:
>>>
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
>>>
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
>>> Log:
>>> to fix exception 1 below test switched to using once created
>>> project. setUp just check if it is created and use it or create a
>>> new one.
>>>
>>> delete project is commented out in abstract class, because it always
>>> shrows exceptions cannot delete project.
>>>
>>> Exception 1
>>> --------------
>>> Resource '/warprj' already exists.
>>>
>>> org.eclipse.core.internal.resources.ResourceException: Resource
>>> '/warprj' already exists.
>>> at
>>> org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:289)
>>> at
>>> org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:276)
>>> at org.eclipse.core.internal.resources.Project.create(Project.java:225)
>>> at
>>> org.eclipse.wst.common.project.facet.core.internal.FacetedProjectFrameworkImpl.create(FacetedProjectFrameworkImpl.java:717)
>>> at
>>> org.eclipse.wst.common.project.facet.core.ProjectFacetsManager.create(ProjectFacetsManager.java:399)
>>> at
>>> org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest.createSeamProject(AbstractSeamFacetTest.java:142)
>>> at
>>> org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest.createSeamWarProject(AbstractSeamFacetTest.java:157)
>>> at
>>> org.jboss.tools.seam.core.test.project.facet.Seam2FacetInstallDelegateTest.setUp(Seam2FacetInstallDelegateTest.java:62)
>>> at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
>>> at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
>>> at
>>> org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
>>> at
>>> org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:572)
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:171)
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
>>> at org.eclipse.core.launcher.Main.main(Main.java:30)
>>>
>>> Modified:
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
>>> ===================================================================
>>> ---
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
>>> 2007-11-08 20:51:11 UTC (rev 4798)
>>> +++
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
>>> 2007-11-08 21:02:59 UTC (rev 4799)
>>> @@ -81,7 +81,7 @@
>>> for (IResource r : this.resourcesToCleanup) {
>>> try {
>>> System.out.println("Deleting " + r);
>>> - r.delete(true, null);
>>> + //r.delete(true, null);
>>> } catch(Exception e) {
>>> System.out.println("Error deleting " + r);
>>> e.printStackTrace();
>>>
>>> Modified:
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
>>> ===================================================================
>>> ---
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
>>> 2007-11-08 20:51:11 UTC (rev 4798)
>>> +++
>>> trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
>>> 2007-11-08 21:02:59 UTC (rev 4799)
>>> @@ -21,6 +21,8 @@
>>> import org.eclipse.core.resources.IResource;
>>> import org.eclipse.core.resources.IResourceProxy;
>>> import org.eclipse.core.resources.IResourceProxyVisitor;
>>> +import org.eclipse.core.resources.IWorkspaceRoot;
>>> +import org.eclipse.core.resources.ResourcesPlugin;
>>> import org.eclipse.core.runtime.CoreException;
>>> import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
>>> import org.eclipse.wst.common.project.facet.core.IFacetedProject;
>>> @@ -50,22 +52,29 @@
>>> @Override
>>> protected void setUp() throws Exception {
>>> - - seam2Facet =
>>> ProjectFacetsManager.getProjectFacet("jst.seam");
>>> - seam2FacetVersion = seam2Facet.getVersion("2.0");
>>> + IWorkspaceRoot wsRoot =
>>> ResourcesPlugin.getWorkspace().getRoot();
>>> + IProject war = (IProject)wsRoot.findMember("warprj");
>>> + IProject ear = (IProject)wsRoot.findMember("earprj");
>>> - File folder = new
>>> File(System.getProperty("jbosstools.test.seam.2.0.0.home",
>>> "/home/max/work/products/jboss-seam-2.0.0.CR2"));
>>> + if(war==null && ear==null) {
>>> -
>>> SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0,
>>> folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
>>> -
>>> SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
>>> - - warProject = createSeamWarProject("warprj");
>>> - earProject = createSeamEarProject("earprj");
>>> + seam2Facet =
>>> ProjectFacetsManager.getProjectFacet("jst.seam");
>>> + seam2FacetVersion = seam2Facet.getVersion("2.0");
>>> + + File folder = new
>>> File(System.getProperty("jbosstools.test.seam.2.0.0.home",
>>> "c:/java/jboss-seam-2.0.0.CR3"));
>>> + +
>>> SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0,
>>> folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
>>> +
>>> SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
>>> -
>>> warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,
>>> null);
>>> + warProject = createSeamWarProject("warprj");
>>> + earProject = createSeamEarProject("earprj");
>>> + +
>>> warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,
>>> null);
>>> + } else {
>>> + warProject = ProjectFacetsManager.create(war);
>>> + earProject =
>>> ProjectFacetsManager.create(ear); + }
>>> - - super.setUp();
>>> }
>>> @@ -87,6 +96,9 @@
>>> warlibs.add("antlr-runtime.jar");
>>> warlibs.add("commons-beanutils.jar");
>>> warlibs.add("commons-digester.jar");
>>> + warlibs.add("commons-collections.jar");
>>> + warlibs.add("janino.jar");
>>> + warlibs.add("antlr.jar");
>>> warlibs.add("drools-compiler.jar");
>>> warlibs.add("drools-core.jar");
>>> warlibs.add("core.jar");
>>>
>>> _______________________________________________
>>> jbosstools-commits mailing list
>>> jbosstools-commits at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jbosstools-commits
>>>
>>>
>>>
>>
>
>
>
More information about the jbosstools-dev
mailing list