Skip to content

Commit 5f8afae

Browse files
committed
Flip test booleans to match disableMetrics
1 parent bdfccf9 commit 5f8afae

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/test/java/software/amazon/awssdk/crt/test/MqttClientConnectionMethodTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void doConnDC_Cred_UC1Test() {
6161
null,
6262
null,
6363
null,
64-
true);
64+
false);
6565
disconnect();
6666
} finally {
6767
close();
@@ -97,7 +97,7 @@ private void doConnDC_Cred_UC2Test() {
9797
null,
9898
null,
9999
null,
100-
true);
100+
false);
101101
disconnect();
102102
} catch (Exception ex) {
103103
throw new RuntimeException(ex);
@@ -133,7 +133,7 @@ private void doConnDC_Cred_UC3Test() {
133133
null,
134134
null,
135135
null,
136-
true);
136+
false);
137137
disconnect();
138138
} catch (Exception ex) {
139139
throw new RuntimeException(ex);
@@ -174,7 +174,7 @@ private void doConnDC_Cred_UC4Test() {
174174
null,
175175
null,
176176
null,
177-
true);
177+
false);
178178
disconnect();
179179
} catch (Exception ex) {
180180
throw new RuntimeException(ex);
@@ -212,7 +212,7 @@ private void doWebsocketIotCoreConnectionTest(Function<ClientBootstrap, Credenti
212212
TlsContext tlsContext = new TlsContext(tlsOptions);
213213
CredentialsProvider provider = providerBuilder.apply(bootstrap)) {
214214

215-
connectWebsockets(provider, AWS_TEST_MQTT311_IOT_CORE_HOST, 443, tlsContext, null, null, null, true);
215+
connectWebsockets(provider, AWS_TEST_MQTT311_IOT_CORE_HOST, 443, tlsContext, null, null, null, false);
216216
disconnect();
217217
} catch (Exception ex) {
218218
throw new RuntimeException(ex);
@@ -335,7 +335,7 @@ private void doConnDC_UC1Test() {
335335
null,
336336
null,
337337
null,
338-
true);
338+
false);
339339
disconnect();
340340
} catch (Exception ex) {
341341
throw new RuntimeException(ex);
@@ -364,7 +364,7 @@ private void doConnDC_UC2Test() {
364364
AWS_TEST_MQTT311_BASIC_AUTH_USERNAME,
365365
AWS_TEST_MQTT311_BASIC_AUTH_PASSWORD,
366366
null,
367-
false);
367+
true);
368368
disconnect();
369369
} catch (Exception ex) {
370370
throw new RuntimeException(ex);
@@ -397,7 +397,7 @@ private void doConnDC_UC3Test() {
397397
null,
398398
null,
399399
null,
400-
true);
400+
false);
401401
disconnect();
402402
} catch (Exception ex) {
403403
throw new RuntimeException(ex);
@@ -438,7 +438,7 @@ private void doConnDC_UC4Test() {
438438
null,
439439
null,
440440
null,
441-
true);
441+
false);
442442
disconnect();
443443
} catch (Exception ex) {
444444
throw new RuntimeException(ex);
@@ -479,7 +479,7 @@ private void doConnDC_UC5Test() {
479479
null,
480480
null,
481481
proxyOptions,
482-
true);
482+
false);
483483
disconnect();
484484
} catch (Exception ex) {
485485
throw new RuntimeException(ex);
@@ -518,7 +518,7 @@ private void doConnWS_UC1Test() {
518518
null,
519519
null,
520520
null,
521-
true);
521+
false);
522522
disconnect();
523523
} catch (Exception ex) {
524524
throw new RuntimeException(ex);
@@ -548,7 +548,7 @@ private void doConnWS_UC2Test() {
548548
AWS_TEST_MQTT311_BASIC_AUTH_USERNAME,
549549
AWS_TEST_MQTT311_BASIC_AUTH_PASSWORD,
550550
null,
551-
false);
551+
true);
552552
disconnect();
553553
} catch (Exception ex) {
554554
throw new RuntimeException(ex);
@@ -582,7 +582,7 @@ private void doConnWS_UC3Test() {
582582
null,
583583
null,
584584
null,
585-
true);
585+
false);
586586
disconnect();
587587
} catch (Exception ex) {
588588
throw new RuntimeException(ex);
@@ -621,7 +621,7 @@ private void doConnWS_UC4Test() {
621621
null,
622622
null,
623623
proxyOptions,
624-
true);
624+
false);
625625
disconnect();
626626
} catch (Exception ex) {
627627
throw new RuntimeException(ex);

src/test/java/software/amazon/awssdk/crt/test/MqttClientConnectionTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private void doConnectDisconnectTest() {
4343
null,
4444
null,
4545
null,
46-
true);
46+
false);
4747
disconnect();
4848
} catch (Exception e) {
4949
throw new RuntimeException(e);
@@ -76,7 +76,7 @@ private void doConnectPublishWaitStatisticsDisconnectTest() {
7676
null,
7777
null,
7878
null,
79-
true);
79+
false);
8080

8181
publish(
8282
"test/topic/" + (UUID.randomUUID()).toString(),
@@ -116,7 +116,7 @@ private void doConnectPublishStatisticsWaitDisconnectTest() {
116116
null,
117117
null,
118118
null,
119-
true);
119+
false);
120120

121121
String topic = "test/topic/" + (UUID.randomUUID()).toString();
122122
byte[] payload = "Hello_World".getBytes();
@@ -163,7 +163,7 @@ private void doECCKeyConnectDisconnectTest() {
163163
null,
164164
null,
165165
null,
166-
true);
166+
false);
167167
disconnect();
168168
} catch (Exception ex) {
169169
throw new RuntimeException(ex);
@@ -196,7 +196,7 @@ private void doConnectDisconnectEventsHappyTest() {
196196
null,
197197
null,
198198
null,
199-
true);
199+
false);
200200

201201
OnConnectionSuccessReturn connectionResult = waitForConnectSuccess();
202202
assertTrue("Connection success callback was empty", connectionResult != null);
@@ -249,7 +249,7 @@ public void testConnectDisconnectEventsUnhappy() {
249249
null,
250250
null,
251251
null,
252-
true);
252+
false);
253253
} catch (Exception ex) {
254254
// Do nothing with the exception - we expect this to throw since we passed an incorrect port.
255255
}
@@ -299,7 +299,7 @@ public void testConnDC_Metrics_BasicAuth_Enabled() {
299299
AWS_TEST_MQTT311_BASIC_AUTH_USERNAME,
300300
AWS_TEST_MQTT311_BASIC_AUTH_PASSWORD,
301301
null,
302-
true); // Metrics enabled
302+
false); // Metrics enabled (disableMetrics=false)
303303
} catch (Exception ex) {
304304
// Expected - connection should fail with metrics enabled and basic auth
305305
}

0 commit comments

Comments
 (0)