Skip to content

Commit cd4482e

Browse files
authored
Test Case fixes (Azure#48319)
1 parent 6545c2f commit cd4482e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/BlobCheckpointStore/BlobsCheckpointStoreInternalLiveTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,10 @@ public async Task OwnershipClaimDoesNotInterfereWithOtherConsumerGroups()
573573
Version = firstOwnership.Version
574574
};
575575

576-
Assert.That(async () => await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default), Throws.InstanceOf<RequestFailedException>());
576+
await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default);
577577
var storedOwnershipList = await checkpointStore.ListOwnershipAsync("namespace", "eventHubName", "consumerGroup1", default);
578578

579+
Assert.That(firstOwnership.Version, Is.Not.EqualTo(secondOwnership.Version));
579580
Assert.That(storedOwnershipList, Is.Not.Null);
580581
Assert.That(storedOwnershipList.Count, Is.EqualTo(1));
581582
Assert.That(storedOwnershipList.Single().IsEquivalentTo(firstOwnership), Is.True);
@@ -619,9 +620,10 @@ public async Task OwnershipClaimDoesNotInterfereWithOtherEventHubs()
619620
Version = firstOwnership.Version
620621
};
621622

622-
Assert.That(async () => await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default), Throws.InstanceOf<RequestFailedException>());
623+
await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default);
623624
var storedOwnershipList = await checkpointStore.ListOwnershipAsync("namespace", "eventHubName1", "consumerGroup", default);
624625

626+
Assert.That(firstOwnership.Version, Is.Not.EqualTo(secondOwnership.Version));
625627
Assert.That(storedOwnershipList, Is.Not.Null);
626628
Assert.That(storedOwnershipList.Count, Is.EqualTo(1));
627629
Assert.That(storedOwnershipList.Single().IsEquivalentTo(firstOwnership), Is.True);
@@ -665,9 +667,10 @@ public async Task OwnershipClaimDoesNotInterfereWithOtherNamespaces()
665667
Version = firstOwnership.Version
666668
};
667669

668-
Assert.That(async () => await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default), Throws.InstanceOf<RequestFailedException>());
670+
await checkpointStore.ClaimOwnershipAsync(new[] { secondOwnership }, default);
669671
var storedOwnershipList = await checkpointStore.ListOwnershipAsync("namespace1", "eventHubName", "consumerGroup", default);
670672

673+
Assert.That(firstOwnership.Version, Is.Not.EqualTo(secondOwnership.Version));
671674
Assert.That(storedOwnershipList, Is.Not.Null);
672675
Assert.That(storedOwnershipList.Count, Is.EqualTo(1));
673676
Assert.That(storedOwnershipList.Single().IsEquivalentTo(firstOwnership), Is.True);

0 commit comments

Comments
 (0)