Author: Grid.Qian
Date: 2009-06-29 03:10:56 -0400 (Mon, 29 Jun 2009)
New Revision: 16242
Modified:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSJavaFirstCommandTest.java
Log:
JBIDE-4350: fix the build failed
Modified:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSJavaFirstCommandTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSJavaFirstCommandTest.java 2009-06-29
07:06:00 UTC (rev 16241)
+++
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSJavaFirstCommandTest.java 2009-06-29
07:10:56 UTC (rev 16242)
@@ -84,8 +84,13 @@
// create jbossws web project
fproject = createJBossWSProject("JavaFirstTestProject",
isServerSupplied());
- clientProject = createProject("ClientTest");
- this.addResourceToCleanup(clientProject);
+
+ if (!ResourcesPlugin.getWorkspace().getRoot().getProject("ClientTest")
+ .exists()) {
+ createProject("ClientTest");
+ // this.addResourceToCleanup(clientProject);
+ }
+
}
protected void tearDown() throws Exception {
@@ -135,18 +140,17 @@
model.addServiceClasses("org.example.www.helloworld.HelloWorld");
model.setGenWSDL(true);
IProject project = fproject.getProject();
-
+
fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
-
+
Java2WSCommand command = new Java2WSCommand(model);
IStatus status = command.execute(null, null);
assertFalse(status.getMessage(), Status.ERROR == status.getSeverity());
assertTrue(project.getFile(
"src/org/example/www/helloworld/jaxws/SayHello.java").exists());
- assertTrue(project.getFile("wsdl/HelloWorldService.wsdl")
- .exists());
+ assertTrue(project.getFile("wsdl/HelloWorldService.wsdl").exists());
}
public void testDeployResult() throws ExecutionException, CoreException,
@@ -164,10 +168,10 @@
WebServiceScenario.BOTTOMUP);
IStatus status = cmd.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
-
+
fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
-
+
cmd = new Java2WSCommand(model);
status = cmd.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
@@ -191,9 +195,9 @@
currentServer.getServerState());
conn.connect();
- assertFalse("The url connection's status is
"+((HttpURLConnection)conn).getResponseMessage(),"Ok".equals(((HttpURLConnection)conn).getResponseMessage()));
-
-
+ assertFalse("The url connection's status is "
+ + ((HttpURLConnection) conn).getResponseMessage(), "Ok"
+ .equals(((HttpURLConnection) conn).getResponseMessage()));
model = new ServiceModel();
model.setWebProjectName("ClientTest");
@@ -202,6 +206,8 @@
status = cmd.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
+ clientProject = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ "ClientTest");
clientProject.open(null);
clientProject.refreshLocal(IResource.DEPTH_INFINITE, null);
@@ -234,8 +240,11 @@
delay(1000);
i++;
}
- assertTrue(((TextConsole) console).getDocument().get(), isContainString(console,
- JBossWSCreationCoreMessages.Client_Sample_Run_Over));
+ assertTrue(
+ ((TextConsole) console).getDocument().get(),
+ isContainString(
+ console,
+ JBossWSCreationCoreMessages.Client_Sample_Run_Over));
}
}
}
Show replies by date