Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <vicchang@nvidia.com>
  • Loading branch information
mocsharp committed Nov 10, 2022
1 parent f783050 commit d5e9945
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public async Task GivenFileStorageMetadata_WhenQueueingWithDatabaseError_ExpectT
_cancellationTokenSource.Token.WaitHandle.WaitOne();
payloadAssembler.Dispose();

_logger.VerifyLoggingMessageBeginsWith($"Number of buckets active: 1.", LogLevel.Trace, Times.AtLeastOnce());
_logger.VerifyLoggingMessageBeginsWith($"Number of incomplete payloads waiting for processing: 1.", LogLevel.Trace, Times.AtLeastOnce());
}

[RetryFact(10, 200)]
Expand All @@ -167,7 +167,7 @@ public async Task GivenAPayloadThatHasNotCompleteUploads_WhenProcessedByTimedEve
await Task.Delay(1001);
payloadAssembler.Dispose();

_logger.VerifyLoggingMessageBeginsWith($"Number of buckets active: 1.", LogLevel.Trace, Times.AtLeastOnce());
_logger.VerifyLoggingMessageBeginsWith($"Number of incomplete payloads waiting for processing: 1.", LogLevel.Trace, Times.AtLeastOnce());
_logger.VerifyLoggingMessageBeginsWith($"Bucket A sent to processing queue", LogLevel.Information, Times.Never());
}

Expand All @@ -183,7 +183,7 @@ public async Task GivenAPayloadThatHasCompletedUploads_WhenProcessedByTimedEvent
var result = payloadAssembler.Dequeue(_cancellationTokenSource.Token);
payloadAssembler.Dispose();

_logger.VerifyLoggingMessageBeginsWith($"Number of buckets active: 1.", LogLevel.Trace, Times.AtLeastOnce());
_logger.VerifyLoggingMessageBeginsWith($"Number of incomplete payloads waiting for processing: 1.", LogLevel.Trace, Times.AtLeastOnce());
Assert.Single(result.Files);
_logger.VerifyLoggingMessageBeginsWith($"Bucket A sent to processing queue with {result.Count} files", LogLevel.Information, Times.AtLeastOnce());
}
Expand Down

0 comments on commit d5e9945

Please sign in to comment.