You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Event Hubs] Processor Test Scenario (Azure#34924)
The focus of these changes is to add a scenario to the event processor
tests to validate that a checkpoint can be created from cached `ProcessEventArgs`
after the processor has stopped.
// Validate that a single partition was processed and a checkpoint can be written.
989
+
990
+
Assert.That(partitions.Count,Is.EqualTo(1),"All events should have been processed from a single partition.");
991
+
Assert.That(checkpointArgs,Is.Not.Null,"The checkpoint arguments should have been captured.");
992
+
Assert.That(async()=>awaitcheckpointArgs.UpdateCheckpointAsync(cancellationSource.Token),Throws.Nothing,"Checkpointing should be safe after stopping.");
993
+
994
+
// Validate a checkpoint was created and that events were processed.
995
+
996
+
var checkpoint =await checkpointStore.GetCheckpointAsync(processor.FullyQualifiedNamespace,processor.EventHubName,processor.ConsumerGroup,partitions.First(),cancellationSource.Token);
997
+
Assert.That(checkpoint,Is.Not.Null,"A checkpoint should have been created.");
998
+
Assert.That(processedEvents.Count,Is.AtLeast(beforeCheckpointEvents.Count),"All events before the checkpoint should have been processed.");
999
+
}
1000
+
930
1001
/// <summary>
931
1002
/// Creates an <see cref="EventProcessorClient" /> that uses mock storage and
0 commit comments