This whole test is somehow broken, as it assumes that the class files are real files in file system. This may not be the case, e.g. when in JAR files, in a web application,…. The test should read the files from the ClassLoader and not using file system functions. We already had a problem with this test because of the whitespace in my username on my windows account (*g*), I fixed it. But altogether I would remove the test in complete and replace by a better test that uses classloader functions to inspect the classpath.

 

As far as I know, there are classloader methods to find all classes in one package (which is similar like a files.list() and endsWith(“.class”)).

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de

eMail: uwe@thetaphi.de

 

From: Robert Muir [mailto:rcmuir@gmail.com]
Sent: Sunday, September 05, 2010 2:37 PM
To: dev@lucene.apache.org
Subject: Re: Build failed in Hudson: Solr-trunk #1238

 

I think this is a real bug, you can reproduce with 'ant test -Dtests.threadspercpu=0' to force all tests to run in a single jvm.

 

the problem is some static or similar in ReplicationHandler, the following will workaround it, but i cant find the static:

 

Index: solr/src/test/org/apache/solr/SolrInfoMBeanTest.java

===================================================================

--- solr/src/test/org/apache/solr/SolrInfoMBeanTest.java        (revision 992411)

+++ solr/src/test/org/apache/solr/SolrInfoMBeanTest.java        (working copy)

@@ -97,7 +97,7 @@

       if (directory.exists()) {

         String[] files = directory.list();

         for (String file : files) {

-          if (file.endsWith(".class")) {

+          if (file.endsWith(".class") && !file.contains("ReplicationHandler")) {

              classes.add(Class.forName(pckgname + '.' + file.substring(0, file.length() - 6)));

           }

         }

 

 

On Sun, Sep 5, 2010 at 4:21 AM, Apache Hudson Server <hudson@hudson.apache.org> wrote:

See <https://hudson.apache.org/hudson/job/Solr-trunk/1238/changes>

Changes:

[koji] fix broken javadoc link to lucene

[rmuir] add super.setup/teardown

[mikemccand] LUCENE-2631: fix small perf issues with String/TermOrdValComparator

[mikemccand] LUCENE-2598: more cutover to newDirectory(Random)

------------------------------------------
[...truncated 6206 lines...]
   [junit]
   [junit] Testcase: testStopPoll(org.apache.solr.handler.TestReplicationHandler):     FAILED
   [junit] expected:<497> but was:<5>
   [junit] junit.framework.AssertionFailedError: expected:<497> but was:<5>
   [junit]     at org.apache.lucene.util.LuceneTestCaseJ4$LuceneTestCaseRunner.runChild(LuceneTestCaseJ4.java:744)
   [junit]     at org.apache.lucene.util.LuceneTestCaseJ4$LuceneTestCaseRunner.runChild(LuceneTestCaseJ4.java:739)
   [junit]     at org.apache.solr.handler.TestReplicationHandler.testStopPoll(TestReplicationHandler.java:303)
   [junit]
   [junit]
   [junit] Tests run: 7, Failures: 3, Errors: 0, Time elapsed: 141.65 sec
   [junit]
   [junit] ------------- Standard Output ---------------
   [junit] NOTE: random codec of testcase 'testReplicateAfterWrite2Slave' was: MockSep
   [junit] NOTE: random locale of testcase 'testReplicateAfterWrite2Slave' was: ms_MY
   [junit] NOTE: random timezone of testcase 'testReplicateAfterWrite2Slave' was: Asia/Singapore
   [junit] NOTE: random codec of testcase 'testIndexAndConfigReplication' was: MockSep
   [junit] NOTE: random locale of testcase 'testIndexAndConfigReplication' was: ms_MY
   [junit] NOTE: random timezone of testcase 'testIndexAndConfigReplication' was: Asia/Singapore
   [junit] NOTE: random codec of testcase 'testStopPoll' was: MockSep
   [junit] NOTE: random locale of testcase 'testStopPoll' was: ms_MY
   [junit] NOTE: random timezone of testcase 'testStopPoll' was: Asia/Singapore
   [junit] ------------- ---------------- ---------------
   [junit] TEST org.apache.solr.handler.TestReplicationHandler FAILED
   [junit] Testsuite: org.apache.solr.handler.XmlUpdateRequestHandlerTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.631 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.admin.LukeRequestHandlerTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.694 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.admin.SystemInfoHandlerTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.004 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.DebugComponentTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.926 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.DistributedDebugComponentTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 9.112 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.DistributedSpellCheckComponentTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 10.684 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.DistributedTermsComponentTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 9.176 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.QueryElevationComponentTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.901 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.SearchHandlerTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.629 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.SpellCheckComponentTest
   [junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 1.022 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.StatsComponentTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.802 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.TermVectorComponentTest
   [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.719 sec
   [junit]
   [junit] Testsuite: org.apache.solr.handler.component.TermsComponentTest
   [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.818 sec
   [junit]
   [junit] Testsuite: org.apache.solr.highlight.FastVectorHighlighterTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.7 sec
   [junit]
   [junit] Testsuite: org.apache.solr.highlight.HighlighterConfigTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.704 sec
   [junit]
   [junit] Testsuite: org.apache.solr.highlight.HighlighterTest
   [junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 1.897 sec
   [junit]
   [junit] Testsuite: org.apache.solr.request.JSONWriterTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.678 sec
   [junit]
   [junit] Testsuite: org.apache.solr.request.SimpleFacetsTest
   [junit] Tests run: 22, Failures: 0, Errors: 0, Time elapsed: 6.127 sec
   [junit]
   [junit] Testsuite: org.apache.solr.request.TestBinaryResponseWriter
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.656 sec
   [junit]
   [junit] Testsuite: org.apache.solr.request.TestFaceting
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 6.147 sec
   [junit]
   [junit] Testsuite: org.apache.solr.request.TestWriterPerf
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.344 sec
   [junit]
   [junit] Testsuite: org.apache.solr.response.TestCSVResponseWriter
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.712 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.BadIndexSchemaTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.469 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.CopyFieldTest
   [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.538 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.DateFieldTest
   [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 1.638 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.IndexSchemaTest
   [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.699 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.LegacyDateFieldTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.311 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.NotRequiredUniqueKeyTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.215 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.PolyFieldTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.966 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.RequiredFieldsTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.669 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.TestBinaryField
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.281 sec
   [junit]
   [junit] Testsuite: org.apache.solr.schema.UUIDFieldTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.004 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.FunctionQParserTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.277 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.QueryParsingTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.626 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.SpatialFilterTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.008 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestDocSet
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.81 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestExtendedDismaxParser
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.779 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestFastLRUCache
   [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.019 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestIndexSearcher
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.445 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestLRUCache
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.008 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestQueryTypes
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.763 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestQueryUtils
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.861 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestRangeQuery
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 18.657 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestSearchPerf
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.308 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestSolrQueryParser
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.654 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.TestSort
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.376 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.function.SortByFunctionTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.433 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.function.TestFunctionQuery
   [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 2.047 sec
   [junit]
   [junit] Testsuite: org.apache.solr.search.function.distance.DistanceFunctionTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.51 sec
   [junit]
   [junit] Testsuite: org.apache.solr.servlet.CacheHeaderTest
   [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 1.132 sec
   [junit]
   [junit] Testsuite: org.apache.solr.servlet.DirectSolrConnectionTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.359 sec
   [junit]
   [junit] Testsuite: org.apache.solr.servlet.NoCacheHeaderTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.945 sec
   [junit]
   [junit] Testsuite: org.apache.solr.servlet.SolrRequestParserTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.97 sec
   [junit]
   [junit] Testsuite: org.apache.solr.spelling.FileBasedSpellCheckerTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.697 sec
   [junit]
   [junit] Testsuite: org.apache.solr.spelling.IndexBasedSpellCheckerTest
   [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.751 sec
   [junit]
   [junit] Testsuite: org.apache.solr.spelling.SpellingQueryConverterTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.008 sec
   [junit]
   [junit] Testsuite: org.apache.solr.spelling.suggest.SuggesterTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.196 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.AutoCommitTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 4.469 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.DirectUpdateHandlerOptimizeTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.722 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.DirectUpdateHandlerTest
   [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 2.216 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.DocumentBuilderTest
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.62 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.TestIndexingPerformance
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.813 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.processor.SignatureUpdateProcessorFactoryTest
   [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 1.434 sec
   [junit]
   [junit] Testsuite: org.apache.solr.update.processor.UpdateRequestProcessorFactoryTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.594 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.DateMathParserTest
   [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 2.439 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.PrimUtilsTest
   [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.023 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.SolrPluginUtilsTest
   [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.646 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.TestNumberUtils
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.314 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.TestOpenBitSet
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.639 sec
   [junit]
   [junit] Testsuite: org.apache.solr.util.TestUtils
   [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.005 sec
   [junit]
   [junit] Testsuite: org.apache.solr.velocity.VelocityResponseWriterTest
   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.83 sec
   [junit]
   [junit] Tests FAILED

BUILD FAILED
<https://hudson.apache.org/hudson/job/Solr-trunk/ws/trunk/solr/build.xml>:383: The following error occurred while executing this line:
<https://hudson.apache.org/hudson/job/Solr-trunk/ws/trunk/solr/build.xml>:483: Tests failed!

Total time: 8 minutes 24 seconds
[TASKS] Skipping publisher since build result is FAILURE
Publishing Javadoc
Archiving artifacts
Recording test results
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org




--
Robert Muir
rcmuir@gmail.com