Skip to content

Commit

Permalink
E2E test for connection events (Azure#4423) (Azure#4464)
Browse files Browse the repository at this point in the history
Co-authored-by: vipeller <51135538+vipeller@users.noreply.github.com>
  • Loading branch information
2 people authored and damonbarry committed Apr 14, 2022
1 parent 055a569 commit 9bd61d3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"value": "true"
},
"DeviceScopeCacheRefreshDelaySecs": {
"value": 1
"value": 0
},
"RuntimeLogLevel": {
"value": "debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"value": "true"
},
"DeviceScopeCacheRefreshDelaySecs": {
"value": 1
"value": 0
},
"RuntimeLogLevel": {
"value": "debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"value": "true"
},
"DeviceScopeCacheRefreshDelaySecs": {
"value": 1
"value": 0
},
"RuntimeLogLevel": {
"value": "debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"value": "true"
},
"DeviceScopeCacheRefreshDelaySecs": {
"value": 1
"value": 0
},
"RuntimeLogLevel": {
"value": "debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task<EdgeDeployment> DeployConfigurationAsync(

if (nestedEdge == true)
{
hubEnvVar = new[] { ("RuntimeLogLevel", "debug"), ("experimentalFeatures__enabled", "true"), ("experimentalFeatures__nestedEdgeEnabled", "true"), ("DeviceScopeCacheRefreshDelaySecs", "1") };
hubEnvVar = new[] { ("RuntimeLogLevel", "debug"), ("experimentalFeatures__enabled", "true"), ("experimentalFeatures__nestedEdgeEnabled", "true"), ("DeviceScopeCacheRefreshDelaySecs", "0") };
}
else
{
Expand Down
14 changes: 14 additions & 0 deletions test/Microsoft.Azure.Devices.Edge.Test/PlugAndPlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public async Task PlugAndPlayDeviceClient(Protocol protocol, bool brokerOn)
{
CancellationToken token = this.TestToken;
string leafDeviceId = DeviceId.Current.Generate();

// If broker is on, MQTT will be used by default in nested environment. And new MQTT won't work for P&P
if (Context.Current.NestedEdge && brokerOn)
{
Assert.Ignore();
}

EdgeDeployment deployment = await this.runtime.DeployConfigurationAsync(
builder =>
{
Expand Down Expand Up @@ -85,6 +92,13 @@ await TryFinally.DoAsync(
public async Task PlugAndPlayModuleClient(Protocol protocol, bool brokerOn)
{
CancellationToken token = this.TestToken;

// If broker is on, MQTT will be used by default in nested environment. And new MQTT won't work for P&P
if (Context.Current.NestedEdge && brokerOn)
{
Assert.Ignore();
}

string loadGenImage = Context.Current.LoadGenImage.Expect(() => new ArgumentException("loadGenImage parameter is required for Priority Queues test"));
EdgeDeployment deployment = await this.runtime.DeployConfigurationAsync(
builder =>
Expand Down

0 comments on commit 9bd61d3

Please sign in to comment.