Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SB extension tests #27349

Merged
merged 3 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,6 @@ public static void Run(
DateTimeOffset[] expiresAtArray,
DateTime[] enqueuedTimeUtcArray,
DateTimeOffset[] enqueuedTimeArray,
DateTimeOffset[] lockedUntilArray,
string[] contentTypeArray,
string[] replyToArray,
string[] toArray,
Expand All @@ -1097,8 +1096,7 @@ public static void Run(
Assert.Greater(expiresAtUtcArray[i], DateTime.UtcNow);
Assert.AreEqual(expiresAtArray[i].DateTime, expiresAtUtcArray[i]);
Assert.Less(enqueuedTimeUtcArray[i], DateTime.UtcNow);
Assert.AreEqual(enqueuedTimeArray[i].DateTime, enqueuedTimeArray[i]);
Assert.Greater(lockedUntilArray[i], DateTimeOffset.UtcNow);
Assert.AreEqual(enqueuedTimeArray[i].DateTime, enqueuedTimeUtcArray[i]);
}
string[] messages = array.Select(x => x.Body.ToString()).ToArray();
ServiceBusMultipleTestJobsBase.ProcessMessages(messages);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ public class DrainModeTestJobQueueBatch
public static async Task QueueWithSessionsBatch(
[ServiceBusTrigger(FirstQueueNameKey, IsSessionsEnabled = true)]
ServiceBusReceivedMessage[] array,
ServiceBusSessionMessageActions messageActions,
ServiceBusSessionMessageActions sessionActions,
CancellationToken cancellationToken,
ILogger logger)
{
Expand All @@ -710,11 +710,11 @@ public static async Task QueueWithSessionsBatch(
foreach (ServiceBusReceivedMessage msg in array)
{
// validate that manual lock renewal works
var initialLockedUntil = messageActions.SessionLockedUntil;
await messageActions.RenewSessionLockAsync();
Assert.Greater(messageActions.SessionLockedUntil, initialLockedUntil);
var initialLockedUntil = sessionActions.SessionLockedUntil;
await sessionActions.RenewSessionLockAsync();
Assert.Greater(sessionActions.SessionLockedUntil, initialLockedUntil);

await messageActions.CompleteMessageAsync(msg);
await sessionActions.CompleteMessageAsync(msg);
}

_drainValidationPostDelay.Set();
Expand Down