mirror of https://github.com/apache/lucene.git
LUCENE-2819: don't report problems about threads that were spawned before our tests (such as eclipse test-runner threads)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1052898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
315370dcbb
commit
5ee58ef139
|
@ -522,6 +522,13 @@ public abstract class LuceneTestCase extends Assert {
|
|||
// jvm-wide list of 'rogue threads' we found, so they only get reported once.
|
||||
private final static IdentityHashMap<Thread,Boolean> rogueThreads = new IdentityHashMap<Thread,Boolean>();
|
||||
|
||||
static {
|
||||
// just a hack for things like eclipse test-runner threads
|
||||
for (Thread t : Thread.getAllStackTraces().keySet()) {
|
||||
rogueThreads.put(t, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks for leftover running threads, trying to kill them off,
|
||||
* so they don't fail future tests.
|
||||
|
|
Loading…
Reference in New Issue