projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71ce08
)
t/02_relation_size.t: Sleep 0.5s for the MRTG test
author
Christoph Berg
<
[email protected]
>
Thu, 19 Sep 2013 10:58:12 +0000
(12:58 +0200)
committer
Christoph Berg
<
[email protected]
>
Thu, 19 Sep 2013 10:58:12 +0000
(12:58 +0200)
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"
t/02_replicate_row.t
patch
|
blob
|
blame
|
history
diff --git
a/t/02_replicate_row.t
b/t/02_replicate_row.t
index 8aee019be60f203e25eafd8b2180ed22d411bc38..7df6354dbc0d2a6a135a479800c0c732df0e5723 100644
(file)
--- 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();