Skip to content

Commit 4aeb0d1

Browse files
committed
Fix failing Profile test
1 parent d4bbb8f commit 4aeb0d1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ protected static void InitializeDataCollectionProfile()
138138
if (string.Equals(value, bool.FalseString, StringComparison.OrdinalIgnoreCase))
139139
{
140140
// Disable data collection only if it is explicitly set to 'false'.
141-
_dataCollectionProfile = new AzurePSDataCollectionProfile(true);
141+
_dataCollectionProfile = new AzurePSDataCollectionProfile(false);
142142
}
143143
else if (string.Equals(value, bool.TrueString, StringComparison.OrdinalIgnoreCase))
144144
{
145145
// Enable data collection only if it is explicitly set to 'true'.
146-
_dataCollectionProfile = new AzurePSDataCollectionProfile(false);
146+
_dataCollectionProfile = new AzurePSDataCollectionProfile(true);
147147
}
148148
}
149149

src/Common/Commands.Common/MetricHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public class MetricHelper
5454
/// </summary>
5555
private readonly object _lock = new object();
5656

57-
private string _hashMacAddress = string.Empty;
57+
private static string _hashMacAddress = string.Empty;
5858

59-
private string HashMacAddress
59+
private static string HashMacAddress
6060
{
6161
get
6262
{

src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.Azure.ServiceManagemenet.Common.Models;
1818
using Microsoft.Azure.Test.HttpRecorder;
1919
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
20+
using Microsoft.WindowsAzure.Commands.Common;
2021
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
2122
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2223
using System;
@@ -107,7 +108,7 @@ private void RunPsTestWorkflow(
107108
helper.RMResourceModule,
108109
helper.RMResourceManagerStartup,
109110
helper.RMInsightsModule);
110-
111+
Environment.SetEnvironmentVariable(AzurePSDataCollectionProfile.EnvironmentVariableName, "false");
111112
try
112113
{
113114
if (scriptBuilder != null)

0 commit comments

Comments
 (0)