Skip to content

Commit

Permalink
[Event Hubs] Partition Context fix (Azure#38265)
Browse files Browse the repository at this point in the history
* fix

* test fix
  • Loading branch information
m-redding committed Aug 17, 2023
1 parent 5041d7c commit d4245e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ private async Task MonitorCachedEvents(DateTimeOffset? lastCheckpointTime, Cance
var details = GetOperationDetails(_mostRecentPartitionContext, "MaxWaitTimeElapsed");
_logger.LogDebug($"Partition Processor has waited MaxWaitTime since last invocation and is attempting to invoke function on all held events ({details})");

UpdateCheckpointContext(triggerEvents, _mostRecentPartitionContext);
await TriggerExecute(triggerEvents, _mostRecentPartitionContext, _functionExecutionToken).ConfigureAwait(false);
if (!backgroundCancellationTokenSource.Token.IsCancellationRequested)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public async Task ProcessEvents_MultipleDispatch_CheckpointsCorrectly(int batchC
Times.Exactly(expected));
}

[TestCase(1, 29)]
[TestCase(5, 5)]
[TestCase(10, 2)]
[TestCase(30, 0)]
[TestCase(1, 30)]
[TestCase(5, 6)]
[TestCase(10, 3)]
[TestCase(30, 1)]
[TestCase(35, 0)]
public async Task ProcessEvents_MultipleDispatch_MinBatch_CheckpointsCorrectly_NoCheckpoint(int batchCheckpointFrequency, int expected)
{
Expand Down Expand Up @@ -221,10 +221,10 @@ public async Task ProcessEvents_MultipleDispatch_MinBatch_CheckpointsCorrectly_R
Times.AtLeastOnce);
}

[TestCase(1, 29)]
[TestCase(5, 5)]
[TestCase(10, 2)]
[TestCase(30, 0)]
[TestCase(1, 30)]
[TestCase(5, 6)]
[TestCase(10, 3)]
[TestCase(30, 1)]
[TestCase(35, 0)]
public async Task ProcessEvents_MultipleDispatch_MinBatch_CheckpointsCorrectly_OldCheckpoint(int batchCheckpointFrequency, int expected)
{
Expand Down

0 comments on commit d4245e5

Please sign in to comment.