Skip to content

Commit a5e2a83

Browse files
authored
Fixed issue when mimicing long running operation for test in Playback mode. (Azure#18490)
1 parent 567d576 commit a5e2a83

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/RecoveryServices/RecoveryServices.Backup.Helpers/TrackingHelpers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static T GetOperationStatus<T>(RestAzureNS.AzureOperationResponse respons
4848
while (opStatusResponse.Body.Status == ServiceClientModel.OperationStatusValues.InProgress)
4949
{
5050
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
51-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
51+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
5252
{
5353
Thread.Sleep(5000);
5454
}
@@ -80,7 +80,7 @@ public static T GetOperationStatus<T, S>(RestAzureNS.AzureOperationResponse<S> r
8080
ServiceClientModel.OperationStatusValues.InProgress)
8181
{
8282
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
83-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
83+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
8484
{
8585
Thread.Sleep(5000);
8686
}
@@ -111,7 +111,7 @@ public static RestAzureNS.AzureOperationResponse GetOperationResult(
111111
while (opStatusResponse.Response.StatusCode == SystemNet.HttpStatusCode.Accepted)
112112
{
113113
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
114-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
114+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
115115
{
116116
Thread.Sleep(5000);
117117
}
@@ -142,7 +142,7 @@ public static RestAzureNS.AzureOperationResponse<T> GetOperationStatusDataMove<T
142142
while (opStatusResponse.Body.Status == "InProgress")
143143
{
144144
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
145-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
145+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
146146
{
147147
Thread.Sleep(5000);
148148
}
@@ -172,7 +172,7 @@ public static RestAzureNS.AzureOperationResponse<T> GetOperationResult<T>(
172172
while (opStatusResponse.Response.StatusCode == SystemNet.HttpStatusCode.Accepted)
173173
{
174174
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
175-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
175+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
176176
{
177177
Thread.Sleep(5000);
178178
}
@@ -217,7 +217,7 @@ public static RestAzureNS.AzureOperationResponse<T> GetOperationResult<T>(
217217
while (opStatusResponse.Response.StatusCode == SystemNet.HttpStatusCode.Accepted)
218218
{
219219
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
220-
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || TestMockSupport.RunningMocked)
220+
if (String.Compare(testMode, "Record", StringComparison.OrdinalIgnoreCase) == 0 || !TestMockSupport.RunningMocked)
221221
{
222222
Thread.Sleep(5000);
223223
}

0 commit comments

Comments
 (0)