Skip to content

Commit 9202380

Browse files
Tests: tidy collection cache regression assertions
Agent-Logs-Url: https://github.com/Azure/azure-cosmos-dotnet-v3/sessions/bc7009ec-e8d3-438c-9a39-fee02fe514ac Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
1 parent 7b06806 commit 9202380

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CollectionCacheTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ protected override Task<ContainerProperties> GetByRidAsync(
8787
CancellationToken cancellationToken)
8888
{
8989
this.RidLookupCount++;
90-
if (!StringComparer.Ordinal.Equals(collectionRid, this.containerRid))
90+
if (StringComparer.Ordinal.Equals(collectionRid, this.containerRid))
91+
{
92+
return Task.FromResult(ContainerProperties.CreateWithResourceId(this.containerRid));
93+
}
94+
else
9195
{
9296
throw new InvalidOperationException($"Unexpected collection rid: {collectionRid}");
9397
}
94-
95-
return Task.FromResult(ContainerProperties.CreateWithResourceId(this.containerRid));
9698
}
9799

98100
protected override Task<ContainerProperties> GetByNameAsync(

0 commit comments

Comments
 (0)