Skip to content

Running tests in parallel causes them to fail #91

@doherty

Description

@doherty
mike@deschamps:~/git/Daemon-Control 
$ prove -j1
./t/00_load.t ....................... ok   
./t/01_lsb_file.t ................... ok   
./t/01_lsb_file_with_init_code.t .... ok   
./t/01_lsb_file_with_init_config.t .. ok   
./t/02_sleep_perl.t ................. ok    
./t/02_sleep_perl_array.t ........... ok    
./t/02_sleep_system.t ............... ok    
./t/03_perl_gets_control.t .......... ok   
./t/04_show_warnings.t .............. ok   
./t/05_user_group.t ................. ok   
./t/06_stderr_stdout.t .............. # Test STDOUT and STDERR when we use plain strings as arguments
./t/06_stderr_stdout.t .............. 3/? # Test STDOUT and STDERR when we use custom arrayrefs as arguments
./t/06_stderr_stdout.t .............. ok    
All tests successful.
Files=11, Tests=87, 37 wallclock secs ( 0.07 usr  0.01 sys +  1.22 cusr  0.12 csys =  1.42 CPU)
Result: PASS

mike@deschamps:~/git/Daemon-Control 
$ prove -j4
./t/00_load.t ....................... ok                                
./t/01_lsb_file.t ................... ok                                
./t/01_lsb_file_with_init_config.t .. ok                                
./t/01_lsb_file_with_init_code.t .... ok                                
===(       9;0  2/?  1/?  0/?  0/? )====================================
#   Failed test 'Daemon started.'
#   at ./t/02_sleep_perl_array.t line 32.
#                   'My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^:\[Started\])'
./t/03_perl_gets_control.t .......... ok                                
===(      16;0  3/?  3/?  2/? )=========================================
#   Failed test 'Daemon started.'
#   at ./t/02_sleep_system.t line 32.
#                   'My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^:\[Started\])'
./t/04_show_warnings.t .............. ok                                
===(      26;10  5/?  5/?  6/? )========================================
#   Failed test 'Daemon started for restarting.'
#   at ./t/02_sleep_perl_array.t line 43.
#                   'My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^:\[Started\])'
===(      35;10  8/?  9/?  7/?  1/? )===================================
#   Failed test 'Daemon started for restarting'
#   at ./t/02_sleep_system.t line 43.
#                   'My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^:\[Started\])'
./t/05_user_group.t ................. ok                                
===(      48;10  9/?  9/?  11/? )=======================================
#   Failed test 'Daemon restarted.'
#   at ./t/02_sleep_perl_array.t line 47.
#                   'My Daemon                                                     [Stopped]
# My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^s:\[Stopped\].*\[Started\])'
===(      52;11  9/?  13/?  11/?  0/? )=================================# Test STDOUT and STDERR when we use plain strings as arguments
===(      55;11  10/?  13/?  12/?  1/? )================================
#   Failed test 'Daemon started.'
#   at ./t/06_stderr_stdout.t line 38.
#                   'My Daemon                                           [Duplicate Running]
# '
#     doesn't match '(?^:\[Started\])'
===(      61;13  12/?  13/?  14/?  3/? )================================
#   Failed test 'Daemon restarted.'
#   at ./t/02_sleep_perl.t line 47.
#                   'My Daemon                                                     [Started]
# '
#     doesn't match '(?^s:\[Stopped\].*\[Started\])'
# Looks like you failed 1 test of 16.
./t/02_sleep_perl.t ................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/16 subtests 
===(      74;13  16/16  18/18  5/? )====================================
#   Failed test 'Daemon stopped after restart.'
#   at ./t/02_sleep_perl_array.t line 51.
#                   'My Daemon                                                 [Not Running]
# '
#     doesn't match '(?^:\[Stopped\])'
# Looks like you failed 4 tests of 16.
./t/02_sleep_perl_array.t ........... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/16 subtests 
===(      74;13  18/18  5/? )===========================================
#   Failed test 'Daemon restarted.'
#   at ./t/02_sleep_system.t line 47.
#                   'My Daemon                                                     [Started]
# '
#     doesn't match '(?^s:\[Stopped\].*\[Started\])'

#   Failed test 'Get status of system daemon.'
#   at ./t/02_sleep_system.t line 50.

#   Failed test 'Daemon stopped after restart.'
#   at ./t/02_sleep_system.t line 51.
#                   ''
#     doesn't match '(?^:\[Stopped\])'
# Looks like you failed 5 tests of 18.
./t/02_sleep_system.t ............... Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/18 subtests 
./t/06_stderr_stdout.t .............. 6/? 
#   Failed test 'STDOUT file contains expected data'
#   at ./t/06_stderr_stdout.t line 49.
#                   ''
#     doesn't match '(?^:STDOUT output success)'

#   Failed test 'STDERR file contains expected data'
#   at ./t/06_stderr_stdout.t line 55.
#          got: ''
#     expected: 'STDERR output success
# '
# Test STDOUT and STDERR when we use custom arrayrefs as arguments
./t/06_stderr_stdout.t .............. 14/? # Looks like you failed 3 tests of 18.
./t/06_stderr_stdout.t .............. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/18 subtests 

Test Summary Report
-------------------
./t/02_sleep_perl.t               (Wstat: 256 Tests: 16 Failed: 1)
  Failed test:  12
  Non-zero exit status: 1
./t/02_sleep_perl_array.t         (Wstat: 1024 Tests: 16 Failed: 4)
  Failed tests:  2, 8, 12, 16
  Non-zero exit status: 4
./t/02_sleep_system.t             (Wstat: 1280 Tests: 18 Failed: 5)
  Failed tests:  2, 10, 14, 17-18
  Non-zero exit status: 5
./t/06_stderr_stdout.t            (Wstat: 768 Tests: 18 Failed: 3)
  Failed tests:  2, 5-6
  Non-zero exit status: 3
Files=11, Tests=87, 18 wallclock secs ( 0.07 usr  0.01 sys +  1.27 cusr  0.11 csys =  1.46 CPU)
Result: FAIL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions