Skip to content

Commit

Permalink
Fixed a bug where test asserts were failing in aws due to not checkin…
Browse files Browse the repository at this point in the history
…g for derived types.
  • Loading branch information
niemyjski committed Sep 26, 2024
1 parent 45f3821 commit 7325278
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Foundatio.TestHarness/Queue/QueueTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1501,15 +1501,15 @@ public virtual async Task MaintainJobNotAbandon_NotWorkTimeOutEntry()
Id = 2
});

var dequeuedQueueItem = Assert.IsType<QueueEntry<SimpleWorkItem>>(await queue.DequeueAsync());
var dequeuedQueueItem = Assert.IsAssignableFrom<QueueEntry<SimpleWorkItem>>(await queue.DequeueAsync());
Assert.NotNull(dequeuedQueueItem.Value);
// The first dequeued item works for 60 milliseconds less than work timeout(100 milliseconds).
await Task.Delay(60);
await dequeuedQueueItem.CompleteAsync();
Assert.True(dequeuedQueueItem.IsCompleted);
Assert.False(dequeuedQueueItem.IsAbandoned);

dequeuedQueueItem = Assert.IsType<QueueEntry<SimpleWorkItem>>(await queue.DequeueAsync());
dequeuedQueueItem = Assert.IsAssignableFrom<QueueEntry<SimpleWorkItem>>(await queue.DequeueAsync());
Assert.NotNull(dequeuedQueueItem.Value);
// The second dequeued item works for 60 milliseconds less than work timeout(100 milliseconds).
await Task.Delay(60);
Expand Down

0 comments on commit 7325278

Please sign in to comment.