dmanto / Mojolicious-Plugin-Cron

a Cron-like helper for Mojolicious full and lite apps
Other
3 stars 7 forks source link

Mismatches in 'exact tstamps' tests #3

Closed eserte closed 6 years ago

eserte commented 6 years ago

Another fail pattern:

# Failed test 'exact tstamps'
# at t/cron.t line 94.
# +--------------------+------------------+--------+
# | PATH               | GOT              | CHECK  |
# +--------------------+------------------+--------+
# | {2018-05-28 15:10} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:15} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:20} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:30} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:40} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:45} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:50} | <DOES NOT EXIST> | <HASH> |
# | {2018-05-28 15:59} | <DOES NOT EXIST> | <HASH> |
# +--------------------+------------------+--------+
# Seeded srand with seed '20180527' from local date.
# Looks like you failed 1 test of 3.
t/cron.t ......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 

Something similar happens with t/one_crontab.t

dmanto commented 6 years ago

That test failing means no cron lines were executed. I tried to reproduce this failure on Ubuntu, Windows or Mac, but I couldn't. Can you share the OS / Configuration on the problematic platform?

update: I see it failing in Travis builds, will check that

eserte commented 6 years ago

I don't see a pattern: I count 16 configurations where this test is failing, with perl versions from 5.16.3 to 5.27.11, and different OS: freebsd 9.2, freebsd 10.3, debian jessie+stretch, CentOS6.

dmanto commented 6 years ago

That happened when EV module was installed. I ended up adding at the very beginning of both test these to lines that happen to be on all Mojo::IOLoop related tests in Mojolicious distributions:

BEGIN {
  $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
}

This forces to use Mojo::Reactor::Poll instead of Mojo::Reactor::EV. So I am not sure the tests are valid when Mojolicious uses EV. I have to ask at #mojo channel, maybe someone can explain me if the tests are enough.

Please let me know if tests are passing now

dmanto commented 6 years ago

Doesn't reproduce after forcing Mojo::Reactor::Poll in tests.