Author: Grid.Qian
Date: 2011-01-24 00:28:50 -0500 (Mon, 24 Jan 2011)
New Revision: 28536
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java
Log:
JBIDE-8046: try to fix the test failed issue
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java 2011-01-24
04:41:06 UTC (rev 28535)
+++
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java 2011-01-24
05:28:50 UTC (rev 28536)
@@ -92,17 +92,11 @@
return model;
}
- public void publishWebProject() throws CoreException {
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
- .getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(modules, null, null);
- serverWC.save(true, null).publish(0, null);
- IStatus status = currentServer.publish(IServer.PUBLISH_FULL, null);
- int i = 0;
- while(!status.isOK() && i++ <30){
- JobUtils.delay(500);
- }
+ public IStatus publishWebProject(IProject project) throws CoreException {
+ IModule mod = ServerUtil.getModule(project);
+ currentServer = ServerRuntimeUtils.addModule(currentServer, mod);
+ IStatus status = ServerRuntimeUtils.publish(currentServer);
+ return status;
}
private boolean isServerSupplied() {
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2011-01-24
04:41:06 UTC (rev 28535)
+++
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2011-01-24
05:28:50 UTC (rev 28536)
@@ -73,13 +73,12 @@
doValidateWSImplCommand();
doJava2WSCommand();
- IProject project = fproject.getProject();
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
startup(currentServer);
- publishWebProject();
- JobUtils.delay(18000);
+ publishWebProject(fproject.getProject());
+ JobUtils.delay(30000);
String webServiceUrl =
"http://localhost:8080/JavaFirstTestProject/HelloWorld?wsdl";
URL url = new URL(webServiceUrl);
URLConnection conn = url.openConnection();
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java 2011-01-24
04:41:06 UTC (rev 28535)
+++
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java 2011-01-24
05:28:50 UTC (rev 28536)
@@ -64,8 +64,8 @@
fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
startup(currentServer);
- publishWebProject();
- JobUtils.delay(12000);
+ publishWebProject(fproject.getProject());
+ JobUtils.delay(15000);
assertTrue(currentServer.getModules().length > 0);
String webServiceUrl =
"http://127.0.0.1:8080/JBossWSTestProject/Greeter?wsdl";
URL url = new URL(webServiceUrl);