diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs b/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs index ec01cd88c1a..36b4f2006cd 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.Devices.Edge.Test.Common public class IotHub { + readonly AzureCliCredential credential; readonly string eventHubName; readonly string eventHubNamespace; readonly Lazy> eventHubPartitionCount; @@ -27,8 +28,22 @@ public class IotHub readonly Lazy serviceClient; static readonly TimeSpan eventHubRequestDuration = TimeSpan.FromSeconds(20); + static AzureCliCredential CreateAzureCliCredential() + { + if (OsPlatform.IsArm() && OsPlatform.Is32Bit()) + { + return new AzureCliCredential(new AzureCliCredentialOptions + { + ProcessTimeout = TimeSpan.FromSeconds(60) + }); + } + + return new AzureCliCredential(); + } + public IotHub(string iotHubHostname, string eventHubName, string eventHubNamespace, Option proxyUri) { + this.credential = IotHub.CreateAzureCliCredential(); this.eventHubName = eventHubName; this.eventHubNamespace = eventHubNamespace; this.iotHubHostname = iotHubHostname; @@ -41,7 +56,7 @@ public IotHub(string iotHubHostname, string eventHubName, string eventHubNamespa proxy.ForEach(p => settings.Proxy = p); return RegistryManager.Create( this.iotHubHostname, - new AzureCliCredential(), + this.credential, settings); }); @@ -52,7 +67,7 @@ public IotHub(string iotHubHostname, string eventHubName, string eventHubNamespa proxy.ForEach(p => settings.HttpProxy = p); return ServiceClient.Create( this.iotHubHostname, - new AzureCliCredential(), + this.credential, DeviceTransportType.Amqp_WebSocket_Only, settings); }); @@ -75,7 +90,7 @@ async Task GetEventHubPartitionCountAsync() EventHubConsumerClient.DefaultConsumerGroupName, this.eventHubNamespace, this.eventHubName, - new AzureCliCredential(), + this.credential, consumerOptions); string[] partitionIds = await consumer.GetPartitionIdsAsync(); @@ -240,7 +255,7 @@ public async Task ReceiveEventsAsync( EventPosition.FromEnqueuedTime(seekTime), this.eventHubNamespace, this.eventHubName, - new AzureCliCredential()); + this.credential); var result = new TaskCompletionSource(); using (token.Register(() => result.TrySetCanceled())) diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/OsPlatform.cs b/test/Microsoft.Azure.Devices.Edge.Test.Common/OsPlatform.cs index 0346eb0f5f5..0b33debbdae 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/OsPlatform.cs +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/OsPlatform.cs @@ -17,6 +17,8 @@ public class OsPlatform { public static readonly IOsPlatform Current = new Linux.OsPlatform(); + public static bool Is32Bit() => RuntimeInformation.OSArchitecture == Architecture.X86 || RuntimeInformation.OSArchitecture == Architecture.Arm; + public static bool Is64Bit() => RuntimeInformation.OSArchitecture == Architecture.X64 || RuntimeInformation.OSArchitecture == Architecture.Arm64; public static bool IsArm() => RuntimeInformation.OSArchitecture == Architecture.Arm || RuntimeInformation.OSArchitecture == Architecture.Arm64; diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/packages.lock.json b/test/Microsoft.Azure.Devices.Edge.Test.Common/packages.lock.json index 790f58cdca7..96f298d53be 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/packages.lock.json +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/packages.lock.json @@ -40,9 +40,9 @@ }, "Microsoft.Azure.Devices.Client": { "type": "Direct", - "requested": "[1.43.0-edgeLts, 1.43.0-edgeLts]", - "resolved": "1.43.0-edgeLts", - "contentHash": "lmcZUT04unp09ZoY9RdXTHjjsZrKs1oFotyvOlZBpsYD06R0/CTpfjbuk54LOqkH0NDk2lErnPAH/+/FE04fMg==", + "requested": "[1.43.2-edgeLts, 1.43.2-edgeLts]", + "resolved": "1.43.2-edgeLts", + "contentHash": "Is/Fed8WHB6E97Hjk2bgKmxH3daVWpNrMX+lJ2ZNJlDlh3PWxgbd1QMETap0cp7ahpn13YXEzvsWmjuZ//XvrQ==", "dependencies": { "MQTTnet": "5.1.0.1559", "Microsoft.Azure.Amqp": "2.6.9", diff --git a/test/Microsoft.Azure.Devices.Edge.Test/packages.lock.json b/test/Microsoft.Azure.Devices.Edge.Test/packages.lock.json index 4c33f1c25ae..a8552e11396 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test/packages.lock.json +++ b/test/Microsoft.Azure.Devices.Edge.Test/packages.lock.json @@ -198,8 +198,8 @@ }, "Microsoft.Azure.Devices.Client": { "type": "Transitive", - "resolved": "1.43.0-edgeLts", - "contentHash": "lmcZUT04unp09ZoY9RdXTHjjsZrKs1oFotyvOlZBpsYD06R0/CTpfjbuk54LOqkH0NDk2lErnPAH/+/FE04fMg==", + "resolved": "1.43.2-edgeLts", + "contentHash": "Is/Fed8WHB6E97Hjk2bgKmxH3daVWpNrMX+lJ2ZNJlDlh3PWxgbd1QMETap0cp7ahpn13YXEzvsWmjuZ//XvrQ==", "dependencies": { "MQTTnet": "5.1.0.1559", "Microsoft.Azure.Amqp": "2.6.9", @@ -708,7 +708,7 @@ "microsoft.azure.devices.edge.moduleutil": { "type": "Project", "dependencies": { - "Microsoft.Azure.Devices.Client": "[1.43.0-edgeLts, 1.43.0-edgeLts]", + "Microsoft.Azure.Devices.Client": "[1.43.2-edgeLts, 1.43.2-edgeLts]", "Microsoft.Azure.Devices.Edge.Util": "[1.0.0, )" } }, @@ -725,7 +725,7 @@ "Azure.Identity": "[1.17.1, )", "Azure.Messaging.EventHubs": "[5.12.2, )", "Microsoft.Azure.Devices": "[1.42.0-edgeLts, 1.42.0-edgeLts]", - "Microsoft.Azure.Devices.Client": "[1.43.0-edgeLts, 1.43.0-edgeLts]", + "Microsoft.Azure.Devices.Client": "[1.43.2-edgeLts, 1.43.2-edgeLts]", "Microsoft.Azure.Devices.Edge.Util": "[1.0.0, )", "Microsoft.Extensions.Configuration.Binder": "[10.0.0, )", "Microsoft.Extensions.Configuration.EnvironmentVariables": "[10.0.0, )", diff --git a/test/modules/ModuleLib/packages.lock.json b/test/modules/ModuleLib/packages.lock.json index 5b4b40b9c3a..525899f888a 100644 --- a/test/modules/ModuleLib/packages.lock.json +++ b/test/modules/ModuleLib/packages.lock.json @@ -4,9 +4,9 @@ "net10.0": { "Microsoft.Azure.Devices.Client": { "type": "Direct", - "requested": "[1.43.0-edgeLts, 1.43.0-edgeLts]", - "resolved": "1.43.0-edgeLts", - "contentHash": "lmcZUT04unp09ZoY9RdXTHjjsZrKs1oFotyvOlZBpsYD06R0/CTpfjbuk54LOqkH0NDk2lErnPAH/+/FE04fMg==", + "requested": "[1.43.2-edgeLts, 1.43.2-edgeLts]", + "resolved": "1.43.2-edgeLts", + "contentHash": "Is/Fed8WHB6E97Hjk2bgKmxH3daVWpNrMX+lJ2ZNJlDlh3PWxgbd1QMETap0cp7ahpn13YXEzvsWmjuZ//XvrQ==", "dependencies": { "MQTTnet": "5.1.0.1559", "Microsoft.Azure.Amqp": "2.6.9",