Skip to content

Commit

Permalink
Update other cases
Browse files Browse the repository at this point in the history
  • Loading branch information
drwill-ms committed Oct 18, 2022
1 parent c1d63a5 commit 5f0961a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion e2e/test/helpers/ProvisioningServiceRetryPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ProvisioningServiceRetryPolicy : IRetryPolicy

private static readonly TimeSpan s_defaultRetryInterval = TimeSpan.FromSeconds(5);

private static readonly IRetryPolicy s_retryPolicy = new ExponentialBackoffRetryPolicy(MaxRetryCount, TimeSpan.FromSeconds(10));
private static readonly IRetryPolicy s_retryPolicy = new IncrementalDelayRetryPolicy(MaxRetryCount, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(3));

public bool ShouldRetry(uint currentRetryCount, Exception lastException, out TimeSpan retryInterval)
{
Expand Down
5 changes: 3 additions & 2 deletions e2e/test/helpers/TestDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum TestDeviceType

public enum ConnectionStringAuthScope
{
IoTHub,
IotHub,
Device,
}

Expand Down Expand Up @@ -121,7 +121,8 @@ await RetryOperationHelper
throw new IotHubServiceException(
$"Created device {requestDevice.Id} not yet gettable from IoT hub.",
HttpStatusCode.NotFound,
IotHubServiceErrorCode.DeviceNotFound);
// Using this causes the exception to be retriable, even though a better match would be DeviceNotFound.
IotHubServiceErrorCode.DeviceNotOnline);
}
},
s_retryPolicy,
Expand Down
8 changes: 4 additions & 4 deletions e2e/test/iothub/messaging/MessageReceiveE2EPoolAmqpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public async Task Message_IoTHubSak_DeviceReceiveSingleMessage_MultipleConnectio
new IotHubClientAmqpSettings(),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
ConnectionStringAuthScope.IoTHub)
ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand All @@ -61,7 +61,7 @@ public async Task Message_IoTHubSak_DeviceReceiveSingleMessage_MultipleConnectio
new IotHubClientAmqpSettings(IotHubClientTransportProtocol.WebSocket),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
ConnectionStringAuthScope.IoTHub)
ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand Down Expand Up @@ -95,7 +95,7 @@ public async Task Message_IoTHubSak_DeviceReceiveSingleMessageUsingCallback_Mult
new IotHubClientAmqpSettings(),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
ConnectionStringAuthScope.IoTHub)
ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand All @@ -107,7 +107,7 @@ public async Task Message_IoTHubSak_DeviceReceiveSingleMessageUsingCallback_Mult
new IotHubClientAmqpSettings(IotHubClientTransportProtocol.WebSocket),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
ConnectionStringAuthScope.IoTHub)
ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand Down
4 changes: 2 additions & 2 deletions e2e/test/iothub/method/MethodE2EPoolAmqpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task Method_IoTHubSak_DeviceReceivesMethodAndResponse_MultipleConne
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
MethodE2ETests.SetDeviceReceiveMethodAsync,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand All @@ -64,7 +64,7 @@ public async Task Method_IoTHubSak_DeviceReceivesMethodAndResponse_MultipleConne
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
MethodE2ETests.SetDeviceReceiveMethodAsync,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand Down
8 changes: 4 additions & 4 deletions e2e/test/iothub/twin/TwinE2EPoolAmqpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task Twin_IoTHubSak_DeviceSetsReportedPropertyAndGetsItBack_Multipl
new IotHubClientAmqpSettings(),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand All @@ -64,7 +64,7 @@ public async Task Twin_IotHubSak_DeviceSetsReportedPropertyAndGetsItBack_Multipl
new IotHubClientAmqpSettings(IotHubClientTransportProtocol.WebSocket),
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand Down Expand Up @@ -104,7 +104,7 @@ public async Task Twin_IoTHubSak_ServiceSetsDesiredPropertyAndDeviceReceivesEven
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
TwinE2ETests.SetTwinPropertyUpdateCallbackHandlerAsync,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand All @@ -118,7 +118,7 @@ public async Task Twin_IoTHubSak_ServiceSetsDesiredPropertyAndDeviceReceivesEven
PoolingOverAmqp.MultipleConnections_PoolSize,
PoolingOverAmqp.MultipleConnections_DevicesCount,
TwinE2ETests.SetTwinPropertyUpdateCallbackHandlerAsync,
authScope: ConnectionStringAuthScope.IoTHub)
authScope: ConnectionStringAuthScope.IotHub)
.ConfigureAwait(false);
}

Expand Down

0 comments on commit 5f0961a

Please sign in to comment.