Skip to content

Commit 65b260d

Browse files
committed
Fix Travis build
- Add static creds in test client to bypass the default credentials chain - Suppress false positive bug
1 parent 3da330c commit 65b260d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

build-tools/src/main/resources/software/amazon/awssdk/spotbugs-suppressions.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@
172172
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
173173
</Match>
174174

175+
<!-- See SpotBugs bug: https://github.com/spotbugs/spotbugs/issues/600, https://github.com/spotbugs/spotbugs/issues/756 -->
176+
<Match>
177+
<Class name="software.amazon.awssdk.codegen.emitters.CodeWriter"/>
178+
<Method name="flush"/>
179+
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
180+
</Match>
181+
182+
175183
<!-- If we're not sure about the RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT, skip the warning. -->
176184
<Match>
177185
<Package name="~software.amazon.awssdk.http.nio.netty.*"/>

test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/EndpointDiscoveryAndEndpointOverrideTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import org.junit.Test;
1616
import org.junit.runner.RunWith;
1717
import org.junit.runners.Parameterized;
18+
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
19+
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
1820
import software.amazon.awssdk.awscore.client.builder.AwsClientBuilder;
1921
import software.amazon.awssdk.core.client.builder.SdkClientBuilder;
2022
import software.amazon.awssdk.core.exception.SdkClientException;
@@ -172,6 +174,7 @@ private static List<TestCase<?>> endpointDiscoveryRequiredAndCustomizedCases(boo
172174
private static <T> T createClient(AwsClientBuilder<?, T> clientBuilder,
173175
boolean endpointOverridden) {
174176
return clientBuilder.region(Region.US_WEST_2)
177+
.credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("akid", "skid")))
175178
.applyMutation(c -> addEndpointOverride(c, endpointOverridden))
176179
.overrideConfiguration(c -> c.retryPolicy(p -> p.numRetries(0))
177180
.addExecutionInterceptor(new EndpointCapturingInterceptor()))

0 commit comments

Comments
 (0)