Good question! One way to run it is temporarily comment out the code in the validate method in lucene/test-framework/src/java/org/apache/lucene/util/TestRuleAssertionsRequired.java
Maybe we should give this tool a static main instead of running it as a test case.. Mike McCandless http://blog.mikemccandless.com On Fri, May 18, 2012 at 8:21 PM, Sudarshan Gaikaiwari <sudars...@acm.org> wrote: > I am trying to run the LookupBenchmarkTest using the following command > > ant -v test -Dtestcase=LookupBenchmarkTest > -Dtests.seed=24BC5D3301BB6D9 -Dargs="-Dfile.encoding=UTF-8" > > I see the following error > --------------------------------------------------------------------------------------------------- > > [junit4] Default encoding: UTF-8 > [junit4] Suite: org.apache.lucene.search.suggest.LookupBenchmarkTest > [junit4] > (@BeforeClass output) > [junit4] 2> NOTE: test params are: codec=Lucene40, > sim=RandomSimilarityProvider(queryNorm=true,coord=false): {}, > locale=sv, timezone=Pacific/Tongatapu > [junit4] 2> NOTE: Linux 2.6.32-41-generic amd64/Sun Microsystems > Inc. 1.6.0_26 (64-bit)/cpus=2,threads=1,free=101664256,total=121372672 > [junit4] 2> NOTE: All tests run in this JVM: [LookupBenchmarkTest] > [junit4] 2> NOTE: reproduce with: ant test > -Dtestcase=LookupBenchmarkTest -Dtests.seed=71CBF75133B374B2 > -Dtests.locale=sv -Dtests.timezone=Pacific/Tongatapu > -Dargs="-Dfile.encoding=UTF-8" > [junit4] 2> > [junit4] ERROR 0.00s | LookupBenchmarkTest (suite) > [junit4] > Throwable #1: java.lang.AssertionError: disable > assertions before running benchmarks! > > --------------------------------------------------------------------------------------------------- > > If I comment out the Assertions in the common-build.xml file > > -------------------------------------------------------------------- > <!-- Assertions. > <assertions> > <enable package="org.apache.lucene"/> > <enable package="org.apache.solr"/> > </assertions> > --> > ------------------------------------------------------------------------ > > I get the following error. > --------------------------------------------------------------------------------- > [junit4] Default encoding: UTF-8 > [junit4] Suite: org.apache.lucene.search.suggest.LookupBenchmarkTest > [junit4] > (@BeforeClass output) > [junit4] 2> NOTE: test params are: codec=Lucene40, sim=null, > locale=null, timezone=(null) > [junit4] 2> NOTE: Linux 2.6.32-41-generic amd64/Sun Microsystems > Inc. 1.6.0_26 (64-bit)/cpus=2,threads=1,free=102887424,total=121372672 > [junit4] 2> NOTE: All tests run in this JVM: [LookupBenchmarkTest] > [junit4] 2> NOTE: reproduce with: ant test > -Dtestcase=LookupBenchmarkTest -Dtests.seed=88E90A184025623E > -Dargs="-Dfile.encoding=UTF-8" > [junit4] 2> > [junit4] ERROR 0.00s | LookupBenchmarkTest (suite) > [junit4] > Throwable #1: java.lang.Exception: Test class > requires assertions, enable assertions globally (-ea) or for > Solr/Lucene subpackages only. > [junit4] > at > org.apache.lucene.util.TestRuleAssertionsRequired.validate(TestRuleAssertionsRequired.java:45) > [junit4] > at > org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:35) > > ------------------------------------------------------------------------------------ > > Please let me know how I should run this test. > > -- > Sudarshan Gaikaiwari > www.sudarshan.org > sudars...@acm.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org