Author: richard.opalka(a)jboss.com
Date: 2012-06-04 06:29:44 -0400 (Mon, 04 Jun 2012)
New Revision: 16347
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl.java
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java
Log:
[JBWS-3490] fixing test - using appropriate sync. techniques, implementing 30 second
timeout
Property changes on: shared-testsuite/branches/jbossws-shared-testsuite-4.0.x
___________________________________________________________________
Modified: svn:mergeinfo
- /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068,16272
+ /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068,16272,16346
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl.java 2012-06-04
09:40:04 UTC (rev 16346)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl.java 2012-06-04
10:29:44 UTC (rev 16347)
@@ -38,8 +38,8 @@
public class EndpointImpl
{
- static String value;
- static RuntimeException ex;
+ static volatile String value;
+ static volatile RuntimeException ex;
@Oneway
public void doit()
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java 2012-06-04
09:40:04 UTC (rev 16346)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java 2012-06-04
10:29:44 UTC (rev 16347)
@@ -40,8 +40,20 @@
public String getString()
{
- if (EndpointImpl.ex != null) throw EndpointImpl.ex;
- return EndpointImpl.value;
+ for (int i = 0; i < 30; i++)
+ {
+ if (EndpointImpl.ex != null) throw EndpointImpl.ex;
+ if (EndpointImpl.value != null) return EndpointImpl.value;
+ try
+ {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ throw new RuntimeException("Timeout: Cannot get injected value");
}
}
Show replies by date