[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Re: [eclipse-dev] New API on IApplicationContext

I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=306010 to discuss the issue some more.

I am not sure if it is possible, but you could try to use the org.eclipse.pde.junit.runtime.coretestapplicationnonmain application instead. The problem is I don't know how you use that application when launching a Junit Plug-in Test from eclipse. I use the org.eclipse.pde.junit.runtime.coretestapplicationnonmain to start session tests for the Eclipse Application container. But I would hope there is a more simple way to do this if you do not want to or need to use session tests.

For now you may still need to mock up an IApplicationContext. I have heard that this can be done easily by using easy mock instead of implementing the interface yourself.

Tom



Inactive hide details for zhu kane ---03/15/2010 10:31:47 PM---Hi Thomas,zhu kane ---03/15/2010 10:31:47 PM---Hi Thomas,


From:

zhu kane <kane.mx@xxxxxxxxx>

To:

"General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>

Cc:

equinox-dev@xxxxxxxxxxx, Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

Date:

03/15/2010 10:31 PM

Subject:

[equinox-dev] Re: [eclipse-dev] New API on IApplicationContext




Hi Thomas,

We used to mock a context object to start the application in the junit test. I tried to migrate the code using ApplicationDescriptor to avoid break caused by the changes of IApplicationContext.
However, the ApplicationDescriptor.launch always fails due to the built-in application 'org.eclipse.pde.junit.runtime.coretestapplication' is LOCKED_SINGLETON_GLOBAL_RUNNING. It doesn't allow running other app in the same time.
Any idea for it?

org.osgi.service.application.ApplicationException: A singleton application instance is already running: org.eclipse.pde.junit.runtime.coretestapplication.0
    at org.eclipse.equinox.internal.app.EclipseAppContainer.lock(EclipseAppContainer.java:481)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.createAppHandle(EclipseAppDescriptor.java:190)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.launchSpecific(EclipseAppDescriptor.java:90)
    at org.osgi.service.application.ApplicationDescriptor.launch(ApplicationDescriptor.java:315)

Best Regards
Kane


On Wed, Mar 3, 2010 at 11:19 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote: _______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image