[ 
https://issues.apache.org/jira/browse/LUCENE-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doron Cohen updated LUCENE-840:
-------------------------------

    Attachment: 840-benchmark-tests.patch

Attached 840-benchmark-tests.patch adds unit tests. 
No bugs exposed, but it would be useful for future changes.

The patch code is relative to contrib/benchmark of current trunk, but it is 
based on the pending changes of 837 and in fact contains these changes, so it 
can be tried now. Once 837 is committed I will update this patch.

I had to modify a little the Benchmark class API so that it is easy to run a 
benchmark from a String, using StringReader (rather than from a file).

Added two tests only - a "parse" one that verifies that tasks are parsed to 
what they should, and a "logic" one that verifies that the test side effects 
(index creation, docs adding, search being called, etc.) is as expected. I 
think it should be fairly easy now to add further tests to the "logic" one, 
should that be needed.

To use it:
 -  cd to contrib/benchmark
 -  apply patch
 -  ant test


> contrib/benchmark unit tests
> ----------------------------
>
>                 Key: LUCENE-840
>                 URL: https://issues.apache.org/jira/browse/LUCENE-840
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: contrib/benchmark
>            Reporter: Doron Cohen
>         Assigned To: Doron Cohen
>            Priority: Minor
>         Attachments: 840-benchmark-tests.patch
>
>
> The need came up in this thread: 
> http://www.mail-archive.com/java-dev@lucene.apache.org/msg09260.html
> : We might want to start thinking about Unit Tests...  :-)  Seems kind
> : of weird to have tests for tests, but this is becoming sufficiently
> : complex that it should have some tests.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to