Skip to content

Commit 823d42b

Browse files
demerphqbingos
authored andcommitted
t/eu_command.t - sleep longer to make cygwin happy
We do a sleep 2 and then expect to see a 2 second difference in the "newer file created" test, but sleep 2 does not necessarily achieve a 2 second file differences. Upping the sleep call to 3 seconds should ensure we see at least 2 seconds difference on operating systems like cygwin.
1 parent ceed070 commit 823d42b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/eu_command.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ BEGIN {
6767

6868
my ($now) = time;
6969
utime ($now, $now, $ARGV[0]);
70-
sleep 2;
70+
71+
sleep 3; # note this affects the "newer file created"
72+
# we used to sleep 2, but with the vagaries of sleep
73+
# this meant that occasionally that test would fail
74+
# on cygwin, by virtue of seeing only a one second
75+
# difference. Sleeping 3 seconds should ensure
76+
# that we get at least 2 seconds difference for
77+
# that test.
7178

7279
# Just checking modify time stamp, access time stamp is set
7380
# to the beginning of the day in Win95.

0 commit comments

Comments
 (0)