Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Odd output from Test::More

by Sidhekin (Priest)
on Sep 26, 2007 at 17:30 UTC ( #641201=note: print w/ replies, xml ) Need Help??


in reply to Odd output from Test::More

Threading or (pseudo-)forking? (It kinda looks like you have two threads running the tests simultaneously.) Or just confused test numbers?

Either way, you are getting the same test numbers twice in the test stream:

... ok n ok n ok n+1 ok n+1 ...

I ran into this a lot when writing tests that fork. Mostly I resolved it by manually increasing the test count and waiting for the children to terminate:

# in the parent, while a child is running $n tests: my $Test = Test::More->builder; $Test->current_test( $Test->current_test + $n ); wait;

Could we perchance see the .t code that produces these complaints?

Update: As andreas1234567's code demonstrates, the error message does not mean what I thought it meant (and still think it says). An "ok 2" followed by an "ok 1" will produce "test 2 answered after test 2". (And an "ok 1" followed by another "ok 1" are quietly accepted as two different tests. Bah.)

Oh well, it's still a case of test numbers coming in the wrong order. (And meanwhile, a new harness is on its way ...)

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!


Comment on Re: Odd output from Test::More
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://641201]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2014-09-02 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (25 votes), past polls