avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From th...@apache.org
Subject svn commit: r996877 - in /avro/trunk: CHANGES.txt lang/ruby/test/tool.rb share/test/interop/bin/test_rpc_interop.sh
Date Tue, 14 Sep 2010 12:48:39 GMT
Author: thiru
Date: Tue Sep 14 12:48:38 2010
New Revision: 996877

URL: http://svn.apache.org/viewvc?rev=996877&view=rev
Log:
AVRO-664. Ruby server takes a long time to start in interop tests

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/ruby/test/tool.rb
    avro/trunk/share/test/interop/bin/test_rpc_interop.sh

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=996877&r1=996876&r2=996877&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Tue Sep 14 12:48:38 2010
@@ -21,6 +21,8 @@ Avro 1.4.1 (unreleased)
     AVRO-657. Fix build so that md5 and sha1 checksum files contain
     only the file's basename without any directories. (cutting)
 
+    AVRO-664. Ruby server takes a long time to start in interop tests. (thiru)
+
 Avro 1.4.0 (31 August 2010)
 
   INCOMPATIBLE CHANGES

Modified: avro/trunk/lang/ruby/test/tool.rb
URL: http://svn.apache.org/viewvc/avro/trunk/lang/ruby/test/tool.rb?rev=996877&r1=996876&r2=996877&view=diff
==============================================================================
--- avro/trunk/lang/ruby/test/tool.rb (original)
+++ avro/trunk/lang/ruby/test/tool.rb Tue Sep 14 12:48:38 2010
@@ -49,7 +49,7 @@ end
 def run_server(uri, proto, msg, datum)
   uri = URI.parse(uri)
   $responder = GenericResponder.new(proto, msg, datum)
-  server = WEBrick::HTTPServer.new(:Host => uri.host,
+  server = WEBrick::HTTPServer.new(:BindAddress => uri.host,
                                    :Port => uri.port,
                                    :Logger => Logger.new(StringIO.new))
   server.mount '/', GenericHandler

Modified: avro/trunk/share/test/interop/bin/test_rpc_interop.sh
URL: http://svn.apache.org/viewvc/avro/trunk/share/test/interop/bin/test_rpc_interop.sh?rev=996877&r1=996876&r2=996877&view=diff
==============================================================================
--- avro/trunk/share/test/interop/bin/test_rpc_interop.sh (original)
+++ avro/trunk/share/test/interop/bin/test_rpc_interop.sh Tue Sep 14 12:48:38 2010
@@ -58,9 +58,20 @@ do
 	    echo TEST: $c
 	    for client in "${clients[@]}"
 	    do
+        rm -rf $portfile
 		$server http://127.0.0.1:0/ $proto $msg -file $c/response.avro \
 		    > $portfile &
-		sleep 1				  # wait for server to start
+        count=0
+        while [ ! -s $portfile ]
+        do
+            sleep 1
+            if [ $count -ge 10 ]
+            then
+                echo $server did not start.
+                exit 1
+            fi
+            count=`expr $count + 1`
+        done
 		read ignore port < $portfile
 	    	$client http://127.0.0.1:$port $proto $msg -file $c/request.avro
 		wait



Mime
View raw message