Commit 1c365662 authored by Andy Wilkinson's avatar Andy Wilkinson

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

See gh-5141
parent ae08934e
...@@ -170,6 +170,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests { ...@@ -170,6 +170,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
.createAsyncRequest(new URI(getLocalUrl("/hello")), HttpMethod.GET) .createAsyncRequest(new URI(getLocalUrl("/hello")), HttpMethod.GET)
.executeAsync(); .executeAsync();
assertThat(response2.get(10, TimeUnit.SECONDS).getRawStatusCode()).isEqualTo(200); assertThat(response2.get(10, TimeUnit.SECONDS).getRawStatusCode()).isEqualTo(200);
clientHttpRequestFactory.destroy();
} }
@Test @Test
......
...@@ -21,6 +21,7 @@ import java.sql.Connection; ...@@ -21,6 +21,7 @@ import java.sql.Connection;
import javax.sql.XAConnection; import javax.sql.XAConnection;
import javax.sql.XADataSource; import javax.sql.XADataSource;
import bitronix.tm.TransactionManagerServices;
import org.junit.Test; import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
...@@ -72,6 +73,7 @@ public class PoolingDataSourceBeanTests { ...@@ -72,6 +73,7 @@ public class PoolingDataSourceBeanTests {
this.bean.init(); this.bean.init();
this.bean.createPooledConnection(dataSource, this.bean); this.bean.createPooledConnection(dataSource, this.bean);
verify(dataSource).getXAConnection(); verify(dataSource).getXAConnection();
TransactionManagerServices.getTaskScheduler().shutdown();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment