xslate / p5-Text-Xslate

Scalable template engine for Perl5
https://metacpan.org/release/Text-Xslate
Other
121 stars 47 forks source link

Test failure t/010_internals/008_files.t #75

Open racke opened 11 years ago

racke commented 11 years ago

This test fails on Perl 5.16.2 while it works on Perl 5.14.2:

#   Failed test 'auto reload'
#   at t/010_internals/008_files.t line 79.
#          got: 'Hello, Perl world!
# '
#     expected: 'Hi, Perl.
# '

#   Failed test 'auto reload'
#   at t/010_internals/008_files.t line 79.
#          got: 'Hello, Perl world!
# '
#     expected: 'Hi, Perl.
# '
# Looks like you failed 2 tests of 67.
t/010_internals/008_files.t ................... 

Regards Racke

gfx commented 11 years ago

Thanks for reporting it.

I could not reproduce this issue, however. Can you show perl -V on your env, please?

gfx commented 11 years ago

Also reported by @mackee https://gist.github.com/mackee/5691171

ppisar commented 10 years ago

I can reproduce it with perl 5.18.2 and current Text-Xslate's master HEAD. This happens if the host is heavily loaded and it's a race in the test.

If you comment the "utime $^T+10, $^T+10, $x;" line out which does precede the failing test, the failure will be inevitable.

I don't know why the modification time is important, but obviously the 10-seconds-after-test-start is a magic constant. If the tested code does not advance to some location in the time, the failure will occur. There should be better synchronization than magic time constants.