Don't leave so many threads lying around in the tests

See gh-5141
This commit is contained in:
Andy Wilkinson 2016-02-12 17:39:14 +00:00
parent ae08934e08
commit 1c365662b0
2 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
.createAsyncRequest(new URI(getLocalUrl("/hello")), HttpMethod.GET)
.executeAsync();
assertThat(response2.get(10, TimeUnit.SECONDS).getRawStatusCode()).isEqualTo(200);
clientHttpRequestFactory.destroy();
}
@Test

View File

@ -21,6 +21,7 @@ import java.sql.Connection;
import javax.sql.XAConnection;
import javax.sql.XADataSource;
import bitronix.tm.TransactionManagerServices;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
@ -72,6 +73,7 @@ public class PoolingDataSourceBeanTests {
this.bean.init();
this.bean.createPooledConnection(dataSource, this.bean);
verify(dataSource).getXAConnection();
TransactionManagerServices.getTaskScheduler().shutdown();
}
}