]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-watch.t
net_reader: fix single NNTP article fetch, test ranges
[public-inbox.git] / t / lei-watch.t
index 9a3bfd80551eb7decd376b3e998cfdb891f4e83e..a881fbb9c05ccb310cd09d657c9b3e210c9a17aa 100644 (file)
@@ -25,7 +25,7 @@ test_lei(sub {
                lei_ok 'daemon-pid'; chomp(my $pid = $lei_out);
                skip 'missing /proc/$PID/fd', 1 if !-d "/proc/$pid/fd";
                my @ino = grep {
-                       readlink($_) =~ /\binotify\b/
+                       (readlink($_) // '') =~ /\binotify\b/
                } glob("/proc/$pid/fd/*");
                is(scalar(@ino), 1, 'only one inotify FD');
                my $ino_fd = (split('/', $ino[0]))[-1];
@@ -52,7 +52,7 @@ test_lei(sub {
        my @f = glob("$md/cur/*:2,");
        is(scalar(@f), 1, 'got populated maildir with one result');
        rename($f[0], "$f[0]S") or xbail "rename $!"; # set (S)een
-       $have_fast_inotify or tick(2);
+       tick($have_fast_inotify ? 0.1 : 2.1); # always needed for 1 CPU systems
        lei_ok qw(note-event done); # flushes immediately (instead of 5s)
 
        lei_ok qw(q mid:testmessage@example.com -o), $md2, '-I', "$ro_home/t1";