Skip to content

Commit d30e7af

Browse files
static qualifier in tests
1 parent d71b8b0 commit d30e7af

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CFP/AllVersionsAndDeletes/BuilderTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public async Task WhenADocumentIsCreatedWithTtlSetThenTheDocumentIsDeletedTestsA
121121

122122
try
123123
{
124-
await Task.Delay(ChangeFeedSetupTime);
124+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
125125
await monitoredContainer.CreateItemAsync<ToDoActivity>(new ToDoActivity { id = "1", pk = "1", description = "Testing TTL on CFP.", ttl = ttlInSeconds }, partitionKey: new PartitionKey("1"));
126126

127127
// NOTE(philipthomas-MSFT): Please allow these Logger.LogLine because TTL on items will purge at random times so I am using this to test when ran locally using emulator.
@@ -239,7 +239,7 @@ public async Task WhenADocumentIsCreatedThenUpdatedThenDeletedTestsAsync()
239239
// 1 second delay between operations to get different timestamps.
240240

241241
await processor.StartAsync();
242-
await Task.Delay(ChangeFeedSetupTime);
242+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
243243

244244
await monitoredContainer.CreateItemAsync<dynamic>(new { id = "1", pk = "1", description = "original test" }, partitionKey: new PartitionKey("1"));
245245
await Task.Delay(1000);
@@ -249,7 +249,7 @@ public async Task WhenADocumentIsCreatedThenUpdatedThenDeletedTestsAsync()
249249

250250
await monitoredContainer.DeleteItemAsync<dynamic>(id: "1", partitionKey: new PartitionKey("1"));
251251

252-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
252+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
253253

254254
await processor.StopAsync();
255255

@@ -531,8 +531,8 @@ private static async Task BuildChangeFeedProcessorWithLatestVersionAsync(
531531
Interlocked.Exchange(ref latestVersionProcessorAtomic, processor);
532532

533533
await processor.StartAsync();
534-
await Task.Delay(ChangeFeedSetupTime);
535-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
534+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
535+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
536536

537537
if (exception != default)
538538
{
@@ -564,8 +564,8 @@ private static async Task BuildChangeFeedProcessorWithAllVersionsAndDeletesAsync
564564
Interlocked.Exchange(ref allVersionsAndDeletesProcessorAtomic, processor);
565565

566566
await processor.StartAsync();
567-
await Task.Delay(ChangeFeedSetupTime);
568-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
567+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
568+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
569569

570570
if (exception != default)
571571
{

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CFP/AllVersionsAndDeletes/BuilderWithCustomSerializerTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ public async Task WhenADocumentIsCreatedWithTtlSetThenTheDocumentIsDeletedTestsA
453453

454454
try
455455
{
456-
await Task.Delay(ChangeFeedSetupTime);
456+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
457457
await monitoredContainer.CreateItemAsync<ToDoActivity>(new ToDoActivity { id = "1", pk = "1", description = "Testing TTL on CFP.", ttl = ttlInSeconds }, partitionKey: new PartitionKey("1"));
458458

459459
// NOTE(philipthomas-MSFT): Please allow these Logger.LogLine because TTL on items will purge at random times so I am using this to test when ran locally using emulator.
@@ -571,7 +571,7 @@ public async Task WhenADocumentIsCreatedThenUpdatedThenDeletedTestsAsync()
571571
// 1 second delay between operations to get different timestamps.
572572

573573
await processor.StartAsync();
574-
await Task.Delay(ChangeFeedSetupTime);
574+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
575575

576576
await monitoredContainer.CreateItemAsync<ToDoActivity>(new ToDoActivity { id = "1", pk = "1", description = "original test", ttl = -1 }, partitionKey: new PartitionKey("1"));
577577
await Task.Delay(1000);
@@ -581,7 +581,7 @@ public async Task WhenADocumentIsCreatedThenUpdatedThenDeletedTestsAsync()
581581

582582
await monitoredContainer.DeleteItemAsync<ToDoActivity>(id: "1", partitionKey: new PartitionKey("1"));
583583

584-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
584+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
585585

586586
await processor.StopAsync();
587587

@@ -658,8 +658,8 @@ private static async Task BuildChangeFeedProcessorWithLatestVersionAsync(
658658
Interlocked.Exchange(ref latestVersionProcessorAtomic, processor);
659659

660660
await processor.StartAsync();
661-
await Task.Delay(ChangeFeedSetupTime);
662-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
661+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
662+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
663663

664664
if (exception != default)
665665
{
@@ -691,8 +691,8 @@ private static async Task BuildChangeFeedProcessorWithAllVersionsAndDeletesAsync
691691
Interlocked.Exchange(ref allVersionsAndDeletesProcessorAtomic, processor);
692692

693693
await processor.StartAsync();
694-
await Task.Delay(ChangeFeedSetupTime);
695-
bool isStartOk = allDocsProcessed.WaitOne(10 * ChangeFeedSetupTime);
694+
await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime);
695+
bool isStartOk = allDocsProcessed.WaitOne(10 * BaseChangeFeedClientHelper.ChangeFeedSetupTime);
696696

697697
if (exception != default)
698698
{

0 commit comments

Comments
 (0)