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

Update package dependencies #1403

Merged
merged 1 commit into from
Oct 13, 2023
Merged
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
2 changes: 1 addition & 1 deletion projects/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.7" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.9" />
<PackageReference Include="Ductus.FluentDocker" Version="2.10.59" />
</ItemGroup>

Expand Down
15 changes: 9 additions & 6 deletions projects/OAuth2Test/OAuth2Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="WireMock.Net" Version="1.5.24" />
<PackageReference Include="Verify.Xunit" Version="20.8.0" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="WireMock.Net" Version="1.5.39" />
<PackageReference Include="Verify.Xunit" Version="22.1.3" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client.OAuth2/RabbitMQ.Client.OAuth2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<ItemGroup>
<None Remove="icon.png" />
<Content Include="icon.png" PackagePath="" />
<None Include="README.md" Pack="true" PackagePath="/"/>
<None Include="README.md" Pack="true" PackagePath="/" />
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Unit, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d20ec856aeeb8c3153a77faa2d80e6e43b5db93224a20cc7ae384f65f142e89730e2ff0fcc5d578bbe96fa98a7196c77329efdee4579b3814c0789e5a39b51df6edd75b602a33ceabdfcf19a3feb832f31d8254168cd7ba5700dfbca301fbf8db614ba41ba18474de0a5f4c2d51c995bc3636c641c8cbe76f45717bfcb943b5</_Parameter1>
</AssemblyAttribute>
Expand All @@ -62,7 +62,7 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
<PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
28 changes: 17 additions & 11 deletions projects/Unit/TestAsyncConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ public async Task TestBasicRoundtripConcurrent()
// ensure we get a delivery
await Task.WhenAll(publish1SyncSource.Task, publish2SyncSource.Task);

Assert.True(publish1SyncSource.Task.Result, $"1 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
Assert.True(publish2SyncSource.Task.Result, $"2 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
bool result1 = await publish1SyncSource.Task;
Assert.True(result1, $"1 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");

bool result2 = await publish2SyncSource.Task;
Assert.True(result2, $"2 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
}
}
}
Expand All @@ -158,7 +161,7 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
}
}

Task publishTask = Task.Run(() =>
Task publishTask = Task.Run(async () =>
{
using (IConnection c = cf.CreateConnection())
{
Expand All @@ -167,14 +170,14 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
QueueDeclareOk q = m.QueueDeclare(queue: queueName, exclusive: false, durable: true);
for (int i = 0; i < publish_total; i++)
{
m.BasicPublish(string.Empty, queueName, body1);
m.BasicPublish(string.Empty, queueName, body2);
await m.BasicPublishAsync(string.Empty, queueName, body1);
await m.BasicPublishAsync(string.Empty, queueName, body2);
}
}
}
});

Task consumeTask = Task.Run(() =>
Task consumeTask = Task.Run(async () =>
{
var publish1SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
var publish2SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
Expand Down Expand Up @@ -219,10 +222,13 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
m.BasicConsume(queueName, true, consumer);

// ensure we get a delivery
Task.WhenAll(publish1SyncSource.Task, publish2SyncSource.Task);
await Task.WhenAll(publish1SyncSource.Task, publish2SyncSource.Task);

bool result1 = await publish1SyncSource.Task;
Assert.True(result1, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");

Assert.True(publish1SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
Assert.True(publish2SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
bool result2 = await publish2SyncSource.Task;
Assert.True(result2, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
}
}
});
Expand Down Expand Up @@ -262,7 +268,7 @@ public void TestBasicRoundtripNoWait()
}

[Fact]
public void ConcurrentEventingTestForReceived()
public async void ConcurrentEventingTestForReceived()
{
const int NumberOfThreads = 4;
const int NumberOfRegistrations = 5000;
Expand Down Expand Up @@ -300,7 +306,7 @@ public void ConcurrentEventingTestForReceived()
}

countdownEvent.Wait();
Task.WaitAll(tasks);
await Task.WhenAll(tasks);

// Add last receiver
var are = new AutoResetEvent(false);
Expand Down
9 changes: 5 additions & 4 deletions projects/Unit/TestConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ public async Task TestBasicRoundtripConcurrent()
{
case publish1:
publish1SyncSource.TrySetResult(true);
publish2SyncSource.Task.GetAwaiter().GetResult();
break;
case publish2:
publish2SyncSource.TrySetResult(true);
publish1SyncSource.Task.GetAwaiter().GetResult();
break;
}
};
Expand All @@ -87,8 +85,11 @@ public async Task TestBasicRoundtripConcurrent()

await Task.WhenAll(publish1SyncSource.Task, publish2SyncSource.Task);

Assert.True(publish1SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
Assert.True(publish2SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
bool result1 = await publish1SyncSource.Task;
Assert.True(result1, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");

bool result2 = await publish1SyncSource.Task;
Assert.True(result2, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/Unit/TestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task TestConfirmBarrier()
{
_channel.BasicPublish("", string.Empty);
}
Assert.True(await _channel.WaitForConfirmsAsync().ConfigureAwait(false));
Assert.True(await _channel.WaitForConfirmsAsync());
}

[Fact]
Expand All @@ -73,12 +73,12 @@ public async Task TestExchangeBinding()
_channel.QueueBind(queue, "dest", string.Empty);

_channel.BasicPublish("src", string.Empty);
await _channel.WaitForConfirmsAsync().ConfigureAwait(false);
await _channel.WaitForConfirmsAsync();
Assert.NotNull(_channel.BasicGet(queue, true));

_channel.ExchangeUnbind("dest", "src", string.Empty);
_channel.BasicPublish("src", string.Empty);
await _channel.WaitForConfirmsAsync().ConfigureAwait(false);
await _channel.WaitForConfirmsAsync();
Assert.Null(_channel.BasicGet(queue, true));

_channel.ExchangeDelete("src");
Expand Down
8 changes: 4 additions & 4 deletions projects/Unit/TestFloodPublishing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public async Task TestUnthrottledFloodPublishingAsync()
}
}

await channel.BasicPublishAsync(CachedString.Empty, CachedString.Empty, _body).ConfigureAwait(false);
await channel.BasicPublishAsync(CachedString.Empty, CachedString.Empty, _body);
}
}
finally
Expand Down Expand Up @@ -135,7 +135,7 @@ public async Task TestMultithreadFloodPublishingAsync()
{
for (int i = 0; i < publishCount; i++)
{
await pubCh.BasicPublishAsync(string.Empty, queueName, sendBody).ConfigureAwait(false);
await pubCh.BasicPublishAsync(string.Empty, queueName, sendBody);
}
}
});
Expand All @@ -154,11 +154,11 @@ public async Task TestMultithreadFloodPublishingAsync()
}
};
consumeCh.BasicConsume(queueName, true, consumer);
Assert.True(pub.Wait(_tenSeconds));

Assert.True(autoResetEvent.WaitOne(_tenSeconds));
}

await pub.ConfigureAwait(false);
await pub;
Assert.Equal(publishCount, receivedCount);
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/Unit/TestMessageCount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task TestMessageCountMethod()
Assert.Equal(0u, _channel.MessageCount(q));

_channel.BasicPublish("", q, _encoding.GetBytes("msg"));
await _channel.WaitForConfirmsAsync().ConfigureAwait(false);
await _channel.WaitForConfirmsAsync();
Assert.Equal(1u, _channel.MessageCount(q));
}
}
Expand Down
18 changes: 9 additions & 9 deletions projects/Unit/TestPublisherConfirms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ public TestPublisherConfirms(ITestOutputHelper output) : base(output)
[Fact]
public void TestWaitForConfirmsWithoutTimeout()
{
TestWaitForConfirms(200, (ch) =>
TestWaitForConfirms(200, async (ch) =>
{
Assert.True(ch.WaitForConfirmsAsync().GetAwaiter().GetResult());
Assert.True(await ch.WaitForConfirmsAsync());
});
}

[Fact]
public void TestWaitForConfirmsWithTimeout()
{
TestWaitForConfirms(200, (ch) =>
TestWaitForConfirms(200, async (ch) =>
{
using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(4)))
{
Assert.True(ch.WaitForConfirmsAsync(cts.Token).GetAwaiter().GetResult());
Assert.True(await ch.WaitForConfirmsAsync(cts.Token));
}
});
}
Expand All @@ -81,13 +81,13 @@ public void TestWaitForConfirmsWithTimeout_MightThrowTaskCanceledException()
bool waitResult = false;
bool sawTaskCanceled = false;

TestWaitForConfirms(10000, (ch) =>
TestWaitForConfirms(10000, async (ch) =>
{
using (var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(1)))
{
try
{
waitResult = ch.WaitForConfirmsAsync(cts.Token).GetAwaiter().GetResult();
waitResult = await ch.WaitForConfirmsAsync(cts.Token);
}
catch (TaskCanceledException)
{
Expand All @@ -105,7 +105,7 @@ public void TestWaitForConfirmsWithTimeout_MightThrowTaskCanceledException()
[Fact]
public void TestWaitForConfirmsWithTimeout_MessageNacked_WaitingHasTimedout_ReturnFalse()
{
TestWaitForConfirms(2000, (ch) =>
TestWaitForConfirms(2000, async (ch) =>
{
IChannel actualChannel = ((AutorecoveringChannel)ch).InnerChannel;
actualChannel
Expand All @@ -115,7 +115,7 @@ public void TestWaitForConfirmsWithTimeout_MessageNacked_WaitingHasTimedout_Retu

using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(4)))
{
Assert.False(ch.WaitForConfirmsAsync(cts.Token).GetAwaiter().GetResult());
Assert.False(await ch.WaitForConfirmsAsync(cts.Token));
}
});
}
Expand All @@ -142,7 +142,7 @@ public async Task TestWaitForConfirmsWithEvents()
{
ch.BasicPublish("", QueueName, _encoding.GetBytes("msg"));
}
await ch.WaitForConfirmsAsync().ConfigureAwait(false);
await ch.WaitForConfirmsAsync();

// Note: number of event invocations is not guaranteed
// to be equal to N because acks can be batched,
Expand Down
11 changes: 7 additions & 4 deletions projects/Unit/Unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<PackageReference Include="Verify.Xunit" Version="20.8.0" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Verify.Xunit" Version="22.1.3" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>

Expand Down