mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
close the HTTP client after each test to close idle connections (https://github.com/dropwizard/dropwizard/issues/8174)
This commit is contained in:
@@ -12,6 +12,7 @@ import org.eclipse.jetty.http.HttpStatus;
|
|||||||
import org.glassfish.jersey.client.JerseyClientBuilder;
|
import org.glassfish.jersey.client.JerseyClientBuilder;
|
||||||
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
|
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
|
||||||
import org.glassfish.jersey.media.multipart.MultiPartFeature;
|
import org.glassfish.jersey.media.multipart.MultiPartFeature;
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
@@ -71,6 +72,11 @@ public abstract class BaseIT {
|
|||||||
this.webSocketUrl = "ws://localhost:" + extension.getLocalPort() + "/ws";
|
this.webSocketUrl = "ws://localhost:" + extension.getLocalPort() + "/ws";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
void cleanup() {
|
||||||
|
this.client.close();
|
||||||
|
}
|
||||||
|
|
||||||
protected String login() {
|
protected String login() {
|
||||||
LoginRequest req = new LoginRequest();
|
LoginRequest req = new LoginRequest();
|
||||||
req.setName("admin");
|
req.setName("admin");
|
||||||
|
|||||||
Reference in New Issue
Block a user