2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.httpinvoker
;
11 import java
.util
.HashSet
;
14 import org
.junit
.After
;
21 public abstract class ThreadedTest
extends TestConfig
{
23 private Set
<TestThread
> threadPool
= new HashSet
<TestThread
>();
25 protected void invokeThread(TestThread thread
) {
26 threadPool
.add(thread
);
31 public void cleanup() throws Throwable
{
33 for(TestThread thread
: threadPool
) {
34 if(thread
.isAlive()) {
39 for(TestThread thread
: threadPool
) {
40 if(thread
.getThrowable() != null) {
41 throw thread
.getThrowable();