From 067c499e6d3a8306770b9bbdbd2ee0c5d98c4987 Mon Sep 17 00:00:00 2001 From: Phil Mesnier Date: Fri, 12 Jan 2007 21:42:48 +0000 Subject: Fri Jan 12 21:40:13 UTC 2007 Phil Mesnier --- TAO/ChangeLog | 18 ++++++++++ TAO/tests/Oneway_Timeouts/client.cpp | 28 ++++++++++++---- TAO/tests/Oneway_Timeouts/run_test.pl | 62 +++++++++++++++++------------------ 3 files changed, 71 insertions(+), 37 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 614fafb30b1..422cfc55b59 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,21 @@ +Fri Jan 12 21:40:13 UTC 2007 Phil Mesnier + + * tests/Oneway_Timeouts/client.cpp: + + Replaced the final invocation used to signal a shutdown to the + server as this is a two-way call that was using the same + timeout-enabled reference as the test. This sometimes caused + spurious timeout errors that are then reported as failures even + though they are not. + + * tests/run_test.pl: + + Increased the process start-up timeout as the old values were + short enough that the script assumed an error even though the + processes were actually running. On busy systems, a 2 or 5 + second delay is really possible, particularly if shared + libraries have to be reloaded or the system is just busy. + Fri Jan 12 20:50:38 UTC 2007 Jeff Parsons * tao/DynamicAny.mpc: diff --git a/TAO/tests/Oneway_Timeouts/client.cpp b/TAO/tests/Oneway_Timeouts/client.cpp index f5d7d5c77fc..bfb78d2364b 100644 --- a/TAO/tests/Oneway_Timeouts/client.cpp +++ b/TAO/tests/Oneway_Timeouts/client.cpp @@ -367,6 +367,13 @@ int main (int ac, char *av[]) ACE_DEBUG ((LM_DEBUG, "Timeout exception during test () invocation %d\n", i)); + + // This exception is expected with forced timeouts, since the + // IOR is invalid. Unless we want to retry the invocation + // go ahead and rethrow and let the outer catch deal with it. + // Likewise if force_timeouts is not set, then throw it anyway + // because the exception should not occur because these are + // oneways. if (retry_timeouts) ACE_DEBUG ((LM_DEBUG,"retrying\n")); else @@ -424,14 +431,23 @@ int main (int ac, char *av[]) } ACE_DEBUG ((LM_DEBUG,"Sending synch request to shutdown server\n")); - if (force_timeout) - // we have one more invocation that may time out. - before = ACE_High_Res_Timer::gettimeofday_hr (); use_twoway = true; use_sync_scope = false; - // Let the server know we're finished. This will timeout if - // force_timeout is true. - tester->test2 (-1); + + if (force_timeout) + { + // we have one more invocation that may time out. + before = ACE_High_Res_Timer::gettimeofday_hr (); + tester->test2 (-1); + } + else + { + // At this point, we aren't interested in the time it takes, we + // want the peer to shut down, so use the non-timeout reference. + // BUT IF THIS DOES raise a timeout, it will be reported as an + // error. + tmp_tester->test2 (-1); + } orb->shutdown (1); diff --git a/TAO/tests/Oneway_Timeouts/run_test.pl b/TAO/tests/Oneway_Timeouts/run_test.pl index 61cd25c87dd..96eb971ccb5 100755 --- a/TAO/tests/Oneway_Timeouts/run_test.pl +++ b/TAO/tests/Oneway_Timeouts/run_test.pl @@ -29,7 +29,7 @@ sub test_timeouts { print "test_timeouts 1 testing...\n"; $CLI->Arguments("-force_timeout -connect_timeout 200"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } @@ -37,14 +37,14 @@ sub test_timeouts print "test_timeouts 2 testing...\n"; # request timeout should override connect timeout $CLI->Arguments("-force_timeout -request_timeout 100 -connect_timeout 200"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } print "test_timeouts 2 passed...\n"; print "test_timeouts 3 testing...\n"; $CLI->Arguments("-use_twoway -force_timeout -connect_timeout 200"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } @@ -52,7 +52,7 @@ sub test_timeouts print "test_timeouts 4 testing...\n"; # request timeout should override connect timeout $CLI->Arguments("-use_twoway -force_timeout -request_timeout 200 -connect_timeout 1000"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } @@ -60,21 +60,21 @@ sub test_timeouts print "test_timeouts 5 testing...\n"; # request_timeout ignored for other sync_scopes $CLI->Arguments("-sync none -force_timeout -request_timeout 100 -connect_timeout 200 -max_request_time 30"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } print "test_timeouts 5 passed...\n"; print "test_timeouts 6 testing...\n"; $CLI->Arguments("-sync eager -force_timeout -request_timeout 100 -connect_timeout 200 -max_request_time 30"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } print "test_timeouts 6 passed...\n"; print "test_timeouts 7 testing...\n"; $CLI->Arguments("-sync delayed -force_timeout -request_timeout 100 -connect_timeout 200 -max_request_time 30"); - my $ret = $CLI->SpawnWaitKill(5); + my $ret = $CLI->SpawnWaitKill(15); if ($ret != 0) { return $ret; } @@ -90,12 +90,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync none -max_request_time 30"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -110,12 +110,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync delayed -max_request_time 30"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -132,12 +132,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync none -max_request_time 30 -use_sleep -run_orb_time 500"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -154,12 +154,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync delayed -max_request_time 30 -use_sleep -run_orb_time 500"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -176,12 +176,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync delayed -max_request_time 30 -use_sleep -run_orb_time 500 -force_connect"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -197,12 +197,12 @@ sub test_buffering if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync none -max_request_time 30 -use_sleep -run_orb_time 500 -force_connect"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -224,12 +224,12 @@ sub test_buffer_count_timeout if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync none -buffer_count 5 -max_request_time 30 -request_timeout 10"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -249,12 +249,12 @@ sub test_buffer_bytes_timeout if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } $CLI->Arguments("-sync none -buffer_bytes 200 -max_request_time 30 -request_timeout 10"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -274,14 +274,14 @@ sub test_buffer_timeout if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } # Must use run_orb_time so that the timer will fire, and to prevent sending the # test_done twoway request which would flush the queue. $CLI->Arguments("-sync none -buffer_timeout 1000 -max_request_time 30 -run_orb_time 1500"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -298,14 +298,14 @@ sub test_buffer_timeout if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } # Must use run_orb_time so that the timer will fire, and to prevent sending the # test_done twoway request which would flush the queue. $CLI->Arguments("-sync delayed -buffer_timeout 1000 -max_request_time 30 -run_orb_time 1500"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -321,14 +321,14 @@ sub test_buffer_timeout if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } # Must use run_orb_time so that the timer will fire, and to prevent sending the # test_done twoway request which would flush the queue. $CLI->Arguments("-sync delayed -force_connect -buffer_timeout 1000 -max_request_time 30 -run_orb_time 1500"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } @@ -349,14 +349,14 @@ sub test_one_request if ($SRV->Spawn() != 0) { return 1; } - if (PerlACE::waitforfile_timed ($srv_ior, 2) != 0) { + if (PerlACE::waitforfile_timed ($srv_ior, 15) != 0) { print STDERR "Error: IOR not found.\n"; return 1; } # Must use run_orb_time so that the timer will fire, and to prevent sending the # test_done twoway request which would flush the queue. $CLI->Arguments("-sync none -buffer_timeout 1000 -max_request_time 30 -run_orb_time 1500 -num_requests 1"); - if ($CLI->SpawnWaitKill(5) != 0) { + if ($CLI->SpawnWaitKill(15) != 0) { print STDERR "Error: Client failed.\n"; return 1; } -- cgit v1.2.1