Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions dotnet/src/BullMQ/BullMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StackExchange.Redis" Version="2.13.17" />
<PackageReference Include="Npgsql" Version="8.0.9" />
<PackageReference Include="StackExchange.Redis" Version="3.1.3" />
<PackageReference Include="Npgsql" Version="10.0.3" />
<PackageReference Include="Cronos" Version="0.13.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.301" PrivateAssets="All" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions dotnet/tests/BullMQ.Tests/BullMQ.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion dotnet/tests/BullMQ.Tests/QueueEventsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ public abstract class QueueEventsTestsBase

protected abstract QueueEventsOptions NewQueueEventsOptions();

protected virtual string? InitialLastEventId => null;

private static string UniqueName() => $"dotnet-qe-{Guid.NewGuid():N}";

[Fact]
public async Task Emits_Completed_For_Processed_Job()
{
var q = UniqueName();
await using var queue = new Queue(q, NewQueueOptions());
await using var events = new QueueEvents(q, NewQueueEventsOptions());
var queueEventsOptions = NewQueueEventsOptions();
queueEventsOptions.LastEventId ??= InitialLastEventId;
await using var events = new QueueEvents(q, queueEventsOptions);
await events.WaitUntilReadyAsync();

var completed = new TaskCompletionSource<QueueEvent>(TaskCreationOptions.RunContinuationsAsynchronously);
Expand Down Expand Up @@ -74,6 +78,8 @@ public sealed class RedisQueueEventsTests : QueueEventsTestsBase
private static string ConnectionString =>
Environment.GetEnvironmentVariable("BULLMQ_TEST_REDIS") ?? "localhost:6379";

protected override string? InitialLastEventId => "0-0";

protected override QueueOptions NewQueueOptions() =>
new() { Connection = ConnectionOptions.FromString(ConnectionString) };

Expand Down
Loading