Skip to content

Commit 7b14e0c

Browse files
fix(e2e): fix some CI tests (#1692)
SendLargestMessage was never supposed to build a batch message of multiple max-sized messages. It was just supposed to be one max sized message The mux tests here should not retry on open because they expect to throw an exception
1 parent 23bebfe commit 7b14e0c

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

iot-e2e-tests/common/src/test/java/tests/integration/com/microsoft/azure/sdk/iot/iothub/MultiplexingClientTests.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,9 @@ public void registerDeviceWithIncorrectCredentialsBeforeOpenThrowsOnOpen() throw
13691369
boolean expectedExceptionThrown = false;
13701370
try
13711371
{
1372-
testInstance.multiplexingClient.open(true);
1372+
// Note that we are opting to not retry on open because the first attempt should result in the caught
1373+
// exception below.
1374+
testInstance.multiplexingClient.open(false);
13731375
}
13741376
catch (MultiplexingClientRegistrationException e)
13751377
{
@@ -1469,7 +1471,7 @@ public void registerDevicesWithIncorrectCredentialsBeforeOpenThrowsOnOpen() thro
14691471
else
14701472
{
14711473
incorrectConnectionString = Tools.getDeviceConnectionString(iotHubConnectionString, testInstance.deviceIdentityArray.get(i+1));
1472-
incorrectConnectionString =incorrectConnectionString.replace(testInstance.deviceIdentityArray.get(i+1).getDeviceId(), testInstance.deviceIdentityArray.get(i).getDeviceId());
1474+
incorrectConnectionString = incorrectConnectionString.replace(testInstance.deviceIdentityArray.get(i+1).getDeviceId(), testInstance.deviceIdentityArray.get(i).getDeviceId());
14731475
}
14741476
DeviceClient clientWithIncorrectCredentials = new DeviceClient(incorrectConnectionString, testInstance.protocol);
14751477
clientsWithIncorrectCredentials.add(clientWithIncorrectCredentials);
@@ -1479,7 +1481,9 @@ public void registerDevicesWithIncorrectCredentialsBeforeOpenThrowsOnOpen() thro
14791481
boolean expectedExceptionThrown = false;
14801482
try
14811483
{
1482-
testInstance.multiplexingClient.open(true);
1484+
// Note that we are opting to not retry on open because the first attempt should result in the caught
1485+
// exception below.
1486+
testInstance.multiplexingClient.open(false);
14831487
}
14841488
catch (MultiplexingClientRegistrationException e)
14851489
{

iot-e2e-tests/common/src/test/java/tests/integration/com/microsoft/azure/sdk/iot/iothub/telemetry/SendMessagesTests.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,9 @@ public void sendManySmallMessagesAsBatch() throws Exception
142142
@ContinuousIntegrationTest
143143
public void sendLargestMessages() throws Exception
144144
{
145-
// Only HTTP supports batching messages
146-
assumeTrue(this.testInstance.protocol == HTTPS);
147-
148-
this.testInstance.setup();
149-
150-
int count = 5;
151-
List<Message> messages = new ArrayList<>(count);
152-
for (int i = 0; i < count; i++)
153-
{
154-
messages.add(new Message(new byte[MAX_MESSAGE_PAYLOAD_SIZE]));
155-
}
156-
145+
testInstance.setup();
157146
testInstance.identity.getClient().open(true);
158-
testInstance.identity.getClient().sendEvents(messages);
147+
testInstance.identity.getClient().sendEvent(new Message(new byte[MAX_MESSAGE_PAYLOAD_SIZE]));
159148
testInstance.identity.getClient().close();
160149
}
161150

0 commit comments

Comments
 (0)