Don't leave so many threads lying around in the tests
See gh-5141
This commit is contained in:
parent
ae08934e08
commit
1c365662b0
|
|
@ -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;
|
||||||
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 {
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue