Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Lucene, mail # dev - hudson hung


Copy link to this message
-
Re: hudson hung
Shai Erera 2012-05-01, 13:59
I tried to enforce a Timeout using this code, added to my top-level test
case (didn't try yet on LTC):

    @Rule
    public static Timeout globalTimeout = new Timeout(100000); // 100
seconds

This comes straight from JUnit. I don't have the randomizedtesting jar in
my project, so I couldn't add the @Timeout annotation.

When I set it to a low value (20 ms), many tests failed as expected.
However, on one occasion, a test took 135 seconds, as reported by JUnit in
eclipse, and still didn't fail ! I don't know what it means though -- the
test usually doesn't take more than 15 seconds to run, so perhaps the
computer was busy, and therefore even the timeout thread didn't get the
chance to fail ... or perhaps the time reported by eclipse is inaccurate.

Anyway, perhaps try with that (just add it to LTC anywhere).

Shai

On Tue, May 1, 2012 at 4:05 PM, Michael McCandless <
[EMAIL PROTECTED]> wrote:

> Hmm, as a test, I tried adding @Timeout(millis=100000) to
> LuceneTestCase, ie 100 seconds, which I think should not trigger on
> any core tests today.
>
> That should then apply to all subclasses of LuceneTestCase right?  Ie
> all tests will be aborted after 100 seconds...
>
> But, something is wrong: I get lots of quick (ie much less than 100
> seconds) failures like this:
>
>   [junit4] Suite: org.apache.lucene.util.TestRamUsageEstimatorOnWildAnimals
>   [junit4] ERROR   0.00s J2 | TestRamUsageEstimatorOnWildAnimals (suite)
>   [junit4]    > Throwable #1: java.lang.RuntimeException: Interrupted
> while waiting for worker? Weird.
>   [junit4]    >        at
> __randomizedtesting.SeedInfo.seed([329191043FC42BEA]:0)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner.runAndWait(RandomizedRunner.java:786)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner.access$900(RandomizedRunner.java:131)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:689)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:723)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:734)
>   [junit4]    >        at
>
> org.apache.lucene.util.UncaughtExceptionsRule$1.evaluate(UncaughtExceptionsRule.java:75)
>   [junit4]    >        at
>
> org.apache.lucene.util.StoreClassNameRule$1.evaluate(StoreClassNameRule.java:38)
>   [junit4]    >        at
>
> org.apache.lucene.util.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:69)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner.runSuite(RandomizedRunner.java:604)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner.access$400(RandomizedRunner.java:131)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:550)
>   [junit4]    > Caused by: java.lang.InterruptedException
>   [junit4]    >        at java.lang.Object.wait(Native Method)
>   [junit4]    >        at java.lang.Thread.join(Thread.java:1266)
>   [junit4]    >        at
>
> com.carrotsearch.randomizedtesting.RandomizedRunner.runAndWait(RandomizedRunner.java:776)
>   [junit4]    >        ... 10 more
>   [junit4]    >
>   [junit4] Completed on J2 in 0.34s, 1 test, 1 error <<< FAILURES!
>   [junit4]
>   [junit4] May 01, 2012 9:02:18 AM
>
> com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.EventBus
> dispatch
>   [junit4] SEVERE: Could not dispatch event:
>
> com.carrotsearch.ant.tasks.junit4.events.aggregated.AggregatedSuiteResultEvent@6637b753
> to handler [wrapper public void
>
> com.carrotsearch.ant.tasks.junit4.listeners.TextReport.onSuiteResult(com.carrotsearch.ant.tasks.junit4.events.aggregated.AggregatedSuiteResultEvent)]
>   [junit4] java.lang.reflect.InvocationTargetException
>   [junit4]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native