Răsfoiți Sursa

Allow 1 second delay in check_udp timeout

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1363 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 20 ani în urmă
părinte
comite
3824f73502
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      plugins/t/check_udp.t

+ 1 - 1
plugins/t/check_udp.t

@@ -48,7 +48,7 @@ SKIP: {
 	my $duration = time - $start;
 	my $duration = time - $start;
 	cmp_ok( $res->return_code, '==', '2', "Hung waiting for response");
 	cmp_ok( $res->return_code, '==', '2', "Hung waiting for response");
 	like  ( $res->output, '/Socket timeout after 5 seconds/', "Timeout message");
 	like  ( $res->output, '/Socket timeout after 5 seconds/', "Timeout message");
-	cmp_ok( $duration, '==', 5, "Timeout exactly right");
+	like  ( $duration, '/^[56]$/', "Timeout after 5 (possibly 6) seconds");
 	my $read_nc = <NC>;
 	my $read_nc = <NC>;
 	close NC;
 	close NC;
 	cmp_ok( $read_nc, 'eq', "foofoo", "Data received correctly" );
 	cmp_ok( $read_nc, 'eq', "foofoo", "Data received correctly" );