summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Berg2013-09-19 10:58:12 +0000
committerChristoph Berg2013-09-19 10:58:12 +0000
commit3e8b5c9c4794bf01943f0da1ef3a97a1c1207872 (patch)
tree37f59fa6ae5ec08240fe079d00bf220ea8176fc9
parenta71ce08f0992c235a51647f6dd0e99a14105f0cd (diff)
t/02_relation_size.t: Sleep 0.5s for the MRTG test
Sleeping 1s created a race condition because we also check after 1s, so it was only luck whether the result of that check is "1" or "2"
-rw-r--r--t/02_replicate_row.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/02_replicate_row.t b/t/02_replicate_row.t
index 8aee019be..7df6354db 100644
--- a/t/02_replicate_row.t
+++ b/t/02_replicate_row.t
@@ -7,6 +7,7 @@ use strict;
use warnings;
use Data::Dumper;
use Test::More tests => 19;
+use Time::HiRes qw(usleep);
use lib 't','.';
use CP_Testing;
@@ -144,7 +145,7 @@ if (fork) {
qq{1\n0\n\n\n}, $t);
}
else {
- sleep 1;
+ usleep 500_000; # 0.5s
$SQL = q{UPDATE reptest SET foo = 'yin' WHERE id = 1};
$dbh2->do($SQL);
$dbh2->commit();