commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: [Math] "NaturalRankingTest"
Date Sat, 14 May 2016 20:05:54 GMT
3. Hardware bugs? Rare but possible.

On 14 May 2016 at 08:01, Gilles <gilles@harfang.homelinux.org> wrote:

> On Sat, 14 May 2016 02:47:18 +0200, Gilles wrote:
>
>> Hello.
>>
>> Test method "testNaNsFixedTiesRandom" (in the above unit test class)
>> can pass or fail depending on the seed value.
>>
>> When seed is 1000, the test passes.
>>
>> When seed is 1001, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 4.0
>>  Elements at index 4 differ.  expected = 3.0 observed = 2.0
>>
>> When seed is 1002, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 2.0
>>  Elements at index 4 differ.  expected = 3.0 observed = 4.0
>>  Elements at index 8 differ.  expected = 2.0 observed = 3.0
>>
>> When seed is 1003, this failure occurs:
>>  Elements at index 8 differ.  expected = 2.0 observed = 4.0
>>
>> When seed is 1004, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 2.0
>>
>> When seed is 1005, this failure occurs:
>>  Elements at index 4 differ.  expected = 3.0 observed = 2.0
>>  Elements at index 8 differ.  expected = 2.0 observed = 3.0
>>
>> When seed is 1006, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 4.0
>>  Elements at index 4 differ.  expected = 3.0 observed = 4.0
>>  Elements at index 8 differ.  expected = 2.0 observed = 3.0
>>
>> When seed is 1007, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 2.0
>>  Elements at index 4 differ.  expected = 3.0 observed = 4.0
>>
>> When seed is 1008, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 2.0
>>  Elements at index 8 differ.  expected = 2.0 observed = 4.0
>>
>> When seed is 1009, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 2.0
>>
>> When seed is 1010, this failure occurs:
>>  Elements at index 1 differ.  expected = 3.0 observed = 4.0
>>  Elements at index 4 differ.  expected = 3.0 observed = 2.0
>>  Elements at index 8 differ.  expected = 2.0 observed = 3.0
>>
>> Also fails when seed is
>>  1011
>>  1012
>>  1013
>>  1014
>>  1015
>>  1016
>>  1017
>>  112351341
>>  -932524
>>
>> Is that expected behaviour?
>> It does not look trivial to understand why one should trust a
>> test that fails most of the time...
>>
>
> The test fails for ~96.3% of the possible seed values.
>
> Cause for such a behaviour can be:
>  1. unit test is buggy
>  2. code being tested is buggy
>
> Are there other possible causes?
>
>
>
> Regards,
> Gilles
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message