Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Running JUnit test org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest
Running JUnit test org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest [message #252552] Wed, 09 April 2008 14:52 Go to next message
Eclipse UserFriend
Originally posted by: jack.NO.SPAM

Hi,
I've added a "Qualify type name" quick assist, and i'd like to run my
tests before submitting my patch.

But if i try to run the
"org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest" test case, i
get an exception:

java.lang.IllegalStateException: Workspace is closed.
at
org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:337)
at
org.eclipse.jdt.ui.tests.core.ProjectTestSetup.getProject(Pr ojectTestSetup.java:40)
at
org.eclipse.jdt.ui.tests.core.ProjectTestSetup.setUp(Project TestSetup.java:64)
at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)

Have you any idea about what is the problem ?

I'm running eclipse 3.4M6 on Mac.

TIA
Re: Running JUnit test org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest [message #252561 is a reply to message #252552] Wed, 09 April 2008 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Jack" <jack@NO.SPAM> wrote in message
news:ftj396$oce$1@build.eclipse.org...
> Hi,
> I've added a "Qualify type name" quick assist, and i'd like to run my
> tests before submitting my patch.
>
> But if i try to run the
> "org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest" test case, i
> get an exception:
>
> java.lang.IllegalStateException: Workspace is closed.


Are you trying to just run that single test, or the entire suite? Maybe the
suite contains some setup code that only runs if you run the whole suite.

Does the test pass if you run it without your plugin loaded? (E.g., close
your plugin project and then run the test again.)
Re: Running JUnit test org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest [message #252568 is a reply to message #252552] Wed, 09 April 2008 17:31 Go to previous message
Eclipse UserFriend
Hi Jack,

this happens if you try to run the test as a regular Junit tests. You
need to start all these tests as "PDE Junit Tests".

Greets
Benny

Jack wrote:
> Hi,
> I've added a "Qualify type name" quick assist, and i'd like to run my
> tests before submitting my patch.
>
> But if i try to run the
> "org.eclipse.jdt.ui.tests.quickfix.AdvancedQuickAssistTest" test case, i
> get an exception:
>
> java.lang.IllegalStateException: Workspace is closed.
> at
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:337)
>
> at
> org.eclipse.jdt.ui.tests.core.ProjectTestSetup.getProject(Pr ojectTestSetup.java:40)
>
> at
> org.eclipse.jdt.ui.tests.core.ProjectTestSetup.setUp(Project TestSetup.java:64)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)
>
>
> Have you any idea about what is the problem ?
>
> I'm running eclipse 3.4M6 on Mac.
>
> TIA
Previous Topic:Using JDT Core for Bytecode Generation
Next Topic:How does the JDT's Java editor implement the text hover with the F2 command?
Goto Forum:
  


Current Time: Tue Jul 22 12:12:13 EDT 2025

Powered by FUDForum. Page generated in 0.03355 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top