harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r480265 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
Date Tue, 28 Nov 2006 23:00:38 GMT
Author: apetrenko
Date: Tue Nov 28 15:00:37 2006
New Revision: 480265

URL: http://svn.apache.org/viewvc?view=rev&rev=480265
Log:
Patch for HARMONY-1879 "[drlvm][unit] org.apache.harmony.tests.internal.net.www.protocol.http.HttpURLConnectionTest
fails"

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java?view=diff&rev=480265&r1=480264&r2=480265
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
Tue Nov 28 15:00:37 2006
@@ -46,6 +46,7 @@
     static class MockServer extends Thread {
         ServerSocket serverSocket;
         boolean accepted = false;
+        boolean started = false;
 
         public MockServer(String name) throws IOException {
             super(name);
@@ -61,6 +62,7 @@
         public void run() {
             try {
                 synchronized (bound) {
+                    started = true;
                     bound.notify();
                 }
                 try {
@@ -195,11 +197,11 @@
 
         server.start();
         synchronized(bound) {
-            bound.wait(5000);
+            if (!server.started) bound.wait(5000);
         }
         proxy.start();
         synchronized(bound) {
-            bound.wait(5000);
+            if (!proxy.started) bound.wait(5000);
         }
 
         connection.connect();
@@ -240,11 +242,11 @@
 
             server.start();
             synchronized(bound) {
-                bound.wait(5000);
+                if (!server.started) bound.wait(5000);
             }
             proxy.start();
             synchronized(bound) {
-                bound.wait(5000);
+                if (!proxy.started) bound.wait(5000);
             }
             connection.connect();
 



Mime
View raw message