lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Sale (JIRA)" <>
Subject [jira] Commented: (LUCENENET-143) NUnit test for Index/TestStressIndexing2
Date Wed, 13 Aug 2008 15:40:44 GMT


Doug Sale commented on LUCENENET-143:

This test is incorrect.  I've also been investigating it.

- uses multiple threads to randomly generate an index
- collects all the documents in a dictionary
- copies the documents into a 2nd index
- compares the indexes for equality, doc-by-doc, field-by-field

After the run-time error fix (swapping the position of the id field in an ArrayList) - the
test fails when comparing the fields in the documents.

The fields are placed in lists and sorted prior to comparison.  However, the sort only compares
field names.  Some documents, due to the random nature of their generation, have multiple
fields with the same name.  So, you could have 2 equivalent documents represented as:

Doc 1: f2=A A C ; f3=D E I H E I B J D E ; f3=J A I F G E I I D J ; id=0;
Doc 2: f2=A A C ; f3=J A I F G E I I D J ; f3=D E I H E I B J D E ; id=0;

When the fields are compared in this order, the equivalency test fails.  <f3=D E I H E
I B J D E> != <f3=J A I F G E I I D J>

Checking out the Lucene version of the test, when the documents' fields are compared, there
is only 1 field in each List (the "id" field).  I'm looking into the discrepancy now.

> NUnit test for Index/TestStressIndexing2
> ----------------------------------------
>                 Key: LUCENENET-143
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Lucene.Net 2.3.1
>            Reporter: Digy
>            Priority: Minor
>         Attachments: TestStressIndexing2.patch
> Following patch resolves a bug, but this test continues to fail.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message