Skip to content

Commit e3892f0

Browse files
committed
Fix NPE in integ tests
1 parent bc4adf7 commit e3892f0

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"category": "AWS Common Runtime HTTP Client",
33
"type": "feature",
4-
"description": "This release includes the preview release of the AWS Common Runtime HTTP client for the AWS SDK for Java v2. The code can be found in the `aws-crt-client` module. See our post over at the [AWS Developer Blog](https://aws.amazon.com/blogs/developer/category/developer-tools/aws-sdk-for-java/) for additional information."
4+
"description": "This release includes the preview release of the AWS Common Runtime HTTP client for the AWS SDK for Java v2. The code can be found in the `aws-crt-client` module."
55
}

http-clients/aws-crt-client/src/it/java/software/amazon/awssdk/http/crt/AwsCrtClientS3IntegrationTest.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@
2222
import java.util.List;
2323
import java.util.concurrent.CompletableFuture;
2424
import java.util.concurrent.TimeUnit;
25-
import org.junit.After;
25+
import org.junit.AfterClass;
2626
import org.junit.Assert;
27-
import org.junit.Before;
27+
import org.junit.BeforeClass;
2828
import org.junit.Test;
2929
import software.amazon.awssdk.auth.credentials.AnonymousCredentialsProvider;
3030
import software.amazon.awssdk.core.ResponseBytes;
3131
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
3232
import software.amazon.awssdk.crt.CrtResource;
33-
import software.amazon.awssdk.crt.io.EventLoopGroup;
34-
import software.amazon.awssdk.crt.io.HostResolver;
3533
import software.amazon.awssdk.http.async.SdkAsyncHttpClient;
3634
import software.amazon.awssdk.regions.Region;
3735
import software.amazon.awssdk.services.s3.S3AsyncClient;
@@ -52,14 +50,12 @@ public class AwsCrtClientS3IntegrationTest {
5250

5351
private static Region REGION = Region.US_EAST_1;
5452

55-
private static EventLoopGroup eventLoopGroup;
56-
private static HostResolver hostResolver;
5753
private static SdkAsyncHttpClient crtClient;
5854

5955
private static S3AsyncClient s3;
6056

61-
@Before
62-
public void setup() {
57+
@BeforeClass
58+
public static void setup() {
6359
CrtResource.waitForNoResources();
6460

6561
crtClient = AwsCrtAsyncHttpClient.create();
@@ -71,12 +67,10 @@ public void setup() {
7167
.build();
7268
}
7369

74-
@After
75-
public void tearDown() {
70+
@AfterClass
71+
public static void tearDown() {
7672
s3.close();
7773
crtClient.close();
78-
hostResolver.close();
79-
eventLoopGroup.close();
8074
CrtResource.waitForNoResources();
8175
}
8276

0 commit comments

Comments
 (0)