<?xml version="1.0" encoding="windows-1252"?>
<node id="641201" title="Re: Odd output from Test::More" created="2007-09-26 13:30:26" updated="2007-09-26 09:30:26">
<type id="11">
note</type>
<author id="106949">
Sidhekin</author>
<data>
<field name="doctext">
&lt;p&gt; Threading or (pseudo-)forking?  (It kinda looks like you have two threads running the tests simultaneously.)  Or just confused test numbers? &lt;/p&gt;

&lt;p&gt; Either way, you are getting the same test numbers twice in the test stream: &lt;/p&gt;

&lt;c&gt;
...
ok n
ok n
ok n+1
ok n+1
...
&lt;/c&gt;

&lt;p&gt; 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:&lt;/p&gt;

&lt;c&gt;
# in the parent, while a child is running $n tests:
my $Test = Test::More-&gt;builder;
$Test-&gt;current_test( $Test-&gt;current_test + $n );
wait;
&lt;/c&gt;

&lt;p&gt; Could we perchance see the .t code that produces these complaints? &lt;/p&gt;

&lt;p&gt; &lt;b&gt;Update:&lt;/b&gt; As [andreas1234567]'s code demonstrates, the error message does not mean what I thought it meant (and still think it says).  An &lt;c&gt;"ok 2"&lt;/c&gt; followed by an &lt;c&gt;"ok 1"&lt;/c&gt; will produce &lt;c&gt;"test 2 answered after test 2"&lt;/c&gt;.  (And an &lt;c&gt;"ok 1"&lt;/c&gt; followed by another &lt;c&gt;"ok 1"&lt;/c&gt; are quietly accepted as two different tests.  Bah.) &lt;/p&gt;

&lt;p&gt; Oh well, it's still a case of test numbers coming in the wrong order.  (And meanwhile, a new harness is on its way ...) &lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-106949"&gt;
&lt;p align=center&gt;
&lt;font size=-1&gt;&lt;code&gt;print "Just another Perl ${\(trickster and hacker)},"&lt;/code&gt;&lt;/font&gt;
&lt;br&gt;The Sidhekin &lt;b&gt;proves&lt;/b&gt; Sidhe did it!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
641197</field>
<field name="parent_node">
641197</field>
</data>
</node>
