diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-03-13 15:48:48 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-03-13 15:48:48 +0100 |
commit | 6100dbec3982b80c6fe88cff15be24f44e5fa1ad (patch) | |
tree | caea870ac8d428e0e1948e78733f476ae643a6f2 /java/test/Ice/udp/AllTests.java | |
parent | minor formatting tweaks to protobuf demo README (diff) | |
download | ice-6100dbec3982b80c6fe88cff15be24f44e5fa1ad.tar.bz2 ice-6100dbec3982b80c6fe88cff15be24f44e5fa1ad.tar.xz ice-6100dbec3982b80c6fe88cff15be24f44e5fa1ad.zip |
Fixed for bug 3830, 3866, 3857 - CHANGES fixes, test/Ice/timeout and udp failures, also committed minor fixes to other tests to better handle slow machines
Diffstat (limited to 'java/test/Ice/udp/AllTests.java')
-rw-r--r-- | java/test/Ice/udp/AllTests.java | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/java/test/Ice/udp/AllTests.java b/java/test/Ice/udp/AllTests.java index e374478f2ea..53f10f5a633 100644 --- a/java/test/Ice/udp/AllTests.java +++ b/java/test/Ice/udp/AllTests.java @@ -76,11 +76,25 @@ public class AllTests Ice.ObjectPrx base = communicator.stringToProxy("test:udp -p 12010").ice_datagram(); Test.TestIntfPrx obj = Test.TestIntfPrxHelper.uncheckedCast(base); - replyI.reset(); - obj.ping(reply); - obj.ping(reply); - obj.ping(reply); - boolean ret = replyI.waitReply(3, 2000); + int nRetry = 5; + boolean ret = false; + while(nRetry-- > 0) + { + replyI.reset(); + obj.ping(reply); + obj.ping(reply); + obj.ping(reply); + ret = replyI.waitReply(3, 2000); + if(ret) + { + break; // Success + } + + // If the 3 datagrams were not received within the 2 seconds, we try again to + // receive 3 new datagrams using a new object. We give up after 5 retries. + replyI = new PingReplyI(); + reply =(Test.PingReplyPrx)Test.PingReplyPrxHelper.uncheckedCast(adapter.addWithUUID(replyI)).ice_datagram(); + } test(ret == true); if(communicator.getProperties().getPropertyAsInt("Ice.Override.Compress") == 0) |