This is an automated email from the ASF dual-hosted git repository.
blankensteiner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 37dc02a Updated Google.Protobuf and moved from xUnit v2 to v3
37dc02a is described below
commit 37dc02a698b2e9968528edf30b02e1a7efae8807
Author: Daniel Blankensteiner <[email protected]>
AuthorDate: Fri Jan 30 11:52:41 2026 +0100
Updated Google.Protobuf and moved from xUnit v2 to v3
---
CHANGELOG.md | 2 +-
benchmarks/Compression/Compression.csproj | 2 +-
src/DotPulsar/DotPulsar.csproj | 2 +-
tests/DotPulsar.Tests/AutoDataAttribute.cs | 2 +-
tests/DotPulsar.Tests/DotPulsar.Tests.csproj | 5 +++--
.../Extensions/ReceiveExtensionsTests.cs | 3 +--
.../Extensions/StateExtensionsTests.cs | 14 +++++++-------
.../Extensions/StateHolderExtensionsTests.cs | 6 +++---
tests/DotPulsar.Tests/InlineAutoDataAttribute.cs | 8 ++++++--
tests/DotPulsar.Tests/IntegrationFixture.cs | 7 ++++---
tests/DotPulsar.Tests/Internal/AsyncLockTests.cs | 4 ++--
tests/DotPulsar.Tests/Internal/AsyncQueueTests.cs | 12 ++++++------
tests/DotPulsar.Tests/Internal/ConsumerTests.cs | 3 +--
.../Internal/MessageProcessorTests.cs | 12 ++++++------
.../DotPulsar.Tests/Internal/PingPongHandlerTest.cs | 8 ++++----
tests/DotPulsar.Tests/Internal/ProducerTests.cs | 1 -
tests/DotPulsar.Tests/Internal/ReaderTests.cs | 1 -
tests/DotPulsar.Tests/Internal/StateManagerTests.cs | 20 ++++++++++----------
tests/DotPulsar.Tests/PulsarClientTests.cs | 1 -
tests/DotPulsar.Tests/TestOutputHelperExtensions.cs | 2 --
20 files changed, 57 insertions(+), 58 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c31b9a..dee03cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.1.0/)
### Changed
-- Updated the Google.Protobuf dependency from version 3.33.2 to 3.33.4
+- Updated the Google.Protobuf dependency from version 3.33.2 to 3.33.5
- Downgraded the Microsoft.Extensions.ObjectPool dependency from version
10.0.1 to 8.0.23 for .NET 8
- Downgraded the Microsoft.Extensions.ObjectPool dependency from version
10.0.1 to 9.0.12 for .NET 9
- Updated the Microsoft.Extensions.ObjectPool dependency from version 10.0.1
to 10.0.2 for .NET 10 and .NET Standard 2.X
diff --git a/benchmarks/Compression/Compression.csproj
b/benchmarks/Compression/Compression.csproj
index ce73727..8c6d75a 100644
--- a/benchmarks/Compression/Compression.csproj
+++ b/benchmarks/Compression/Compression.csproj
@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
- <PackageReference Include="Google.Protobuf" Version="3.33.4" />
+ <PackageReference Include="Google.Protobuf" Version="3.33.5" />
<PackageReference Include="Grpc.Tools" Version="2.76.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers;
buildtransitive</IncludeAssets>
diff --git a/src/DotPulsar/DotPulsar.csproj b/src/DotPulsar/DotPulsar.csproj
index 838325a..0586d91 100644
--- a/src/DotPulsar/DotPulsar.csproj
+++ b/src/DotPulsar/DotPulsar.csproj
@@ -24,7 +24,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Google.Protobuf" Version="3.33.4" />
+ <PackageReference Include="Google.Protobuf" Version="3.33.5" />
<PackageReference Include="Grpc.Tools" Version="2.76.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers;
buildtransitive</IncludeAssets>
diff --git a/tests/DotPulsar.Tests/AutoDataAttribute.cs
b/tests/DotPulsar.Tests/AutoDataAttribute.cs
index 3a495e1..6dc3b4b 100644
--- a/tests/DotPulsar.Tests/AutoDataAttribute.cs
+++ b/tests/DotPulsar.Tests/AutoDataAttribute.cs
@@ -17,7 +17,7 @@ namespace DotPulsar.Tests;
using AutoFixture;
using AutoFixture.AutoNSubstitute;
-public class AutoDataAttribute : AutoFixture.Xunit2.AutoDataAttribute
+public class AutoDataAttribute : AutoFixture.Xunit3.AutoDataAttribute
{
public AutoDataAttribute() : base(() => new Fixture().Customize(new
AutoNSubstituteCustomization())) { }
}
diff --git a/tests/DotPulsar.Tests/DotPulsar.Tests.csproj
b/tests/DotPulsar.Tests/DotPulsar.Tests.csproj
index 824ea23..98e6941 100644
--- a/tests/DotPulsar.Tests/DotPulsar.Tests.csproj
+++ b/tests/DotPulsar.Tests/DotPulsar.Tests.csproj
@@ -12,12 +12,13 @@
<Using Include="NSubstitute" />
<Using Include="Shouldly" />
<Using Include="Xunit" />
+ <Using Include="Xunit.TestContext" Static="true" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Apache.Avro" Version="1.12.1" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
- <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
+ <PackageReference Include="AutoFixture.Xunit3" Version="4.19.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers;
buildtransitive</IncludeAssets>
@@ -29,7 +30,7 @@
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="Testcontainers.Pulsar" Version="4.10.0" />
<PackageReference Include="ToxiproxyNetCore" Version="1.0.50" />
- <PackageReference Include="xunit" Version="2.9.3" />
+ <PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers;
buildtransitive</IncludeAssets>
diff --git a/tests/DotPulsar.Tests/Extensions/ReceiveExtensionsTests.cs
b/tests/DotPulsar.Tests/Extensions/ReceiveExtensionsTests.cs
index a5e875e..01a242a 100644
--- a/tests/DotPulsar.Tests/Extensions/ReceiveExtensionsTests.cs
+++ b/tests/DotPulsar.Tests/Extensions/ReceiveExtensionsTests.cs
@@ -16,7 +16,6 @@ namespace DotPulsar.Tests.Extensions;
using DotPulsar.Abstractions;
using DotPulsar.Extensions;
-using Xunit.Abstractions;
[Collection("Integration"), Trait("Category", "Integration")]
public class ReceiveExtensionsTests
@@ -43,7 +42,7 @@ public class ReceiveExtensionsTests
await producer.Send("test-message", _cts.Token);
await producer.Send("test-message", _cts.Token);
_ = await receiver.Receive(_cts.Token); //Trigger the message flow and
wait for the first message to arrive
- await Task.Delay(TimeSpan.FromSeconds(2)); //Wait for the second
message
+ await Task.Delay(TimeSpan.FromSeconds(2), _cts.Token); //Wait for the
second message
//Act
var actual = receiver.TryReceive(out var message);
diff --git a/tests/DotPulsar.Tests/Extensions/StateExtensionsTests.cs
b/tests/DotPulsar.Tests/Extensions/StateExtensionsTests.cs
index a530dfb..6514f31 100644
--- a/tests/DotPulsar.Tests/Extensions/StateExtensionsTests.cs
+++ b/tests/DotPulsar.Tests/Extensions/StateExtensionsTests.cs
@@ -14,7 +14,7 @@
namespace DotPulsar.Tests.Extensions;
-using AutoFixture.Xunit2;
+using AutoFixture.Xunit3;
using DotPulsar.Abstractions;
using DotPulsar.Extensions;
using NSubstitute.ExceptionExtensions;
@@ -31,7 +31,7 @@ public class StateExtensionsTests
uut.IsFinalState(expected).Returns(true);
// Act
- var actual = await uut.OnStateChangeTo(ProducerState.Disconnected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeTo(ProducerState.Disconnected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -48,7 +48,7 @@ public class StateExtensionsTests
uut.IsFinalState(expected).Returns(true);
// Act
- var actual = await uut.OnStateChangeTo(ProducerState.Disconnected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeTo(ProducerState.Disconnected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -64,7 +64,7 @@ public class StateExtensionsTests
uut.OnStateChangeFrom(expected,
Arg.Any<CancellationToken>()).Throws<OperationCanceledException>();
// Act
- var actual = await uut.OnStateChangeTo(expected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeTo(expected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -111,7 +111,7 @@ public class StateExtensionsTests
uut.IsFinalState(expected).Returns(true);
// Act
- var actual = await uut.OnStateChangeFrom(ProducerState.Disconnected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeFrom(ProducerState.Disconnected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -128,7 +128,7 @@ public class StateExtensionsTests
uut.IsFinalState(expected).Returns(true);
// Act
- var actual = await uut.OnStateChangeFrom(ProducerState.Disconnected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeFrom(ProducerState.Disconnected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -144,7 +144,7 @@ public class StateExtensionsTests
uut.OnStateChangeTo(ProducerState.Connected,
Arg.Any<CancellationToken>()).Throws<OperationCanceledException>();
// Act
- var actual = await uut.OnStateChangeFrom(ProducerState.Connected,
TimeSpan.FromSeconds(1));
+ var actual = await uut.OnStateChangeFrom(ProducerState.Connected,
TimeSpan.FromSeconds(1), Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
diff --git a/tests/DotPulsar.Tests/Extensions/StateHolderExtensionsTests.cs
b/tests/DotPulsar.Tests/Extensions/StateHolderExtensionsTests.cs
index c46a7b4..1d2e3ad 100644
--- a/tests/DotPulsar.Tests/Extensions/StateHolderExtensionsTests.cs
+++ b/tests/DotPulsar.Tests/Extensions/StateHolderExtensionsTests.cs
@@ -14,7 +14,7 @@
namespace DotPulsar.Tests.Extensions;
-using AutoFixture.Xunit2;
+using AutoFixture.Xunit3;
using DotPulsar.Abstractions;
using DotPulsar.Extensions;
@@ -34,7 +34,7 @@ public class StateHolderExtensionsTests
void onStateReached(IStateHolder<ProducerState> _, ProducerState
state) => stateReached = state;
// Act
- await uut.DelayedStateMonitor(ProducerState.Connected,
TimeSpan.FromSeconds(1), onStateLeft, onStateReached);
+ await uut.DelayedStateMonitor(ProducerState.Connected,
TimeSpan.FromSeconds(1), onStateLeft, onStateReached,
Current.CancellationToken);
// Assert
stateLeft.HasValue.ShouldBeTrue();
@@ -57,7 +57,7 @@ public class StateHolderExtensionsTests
void onStateReached(IStateHolder<ProducerState> _, ProducerState
state) => stateReached = state;
// Act
- await uut.DelayedStateMonitor(ProducerState.Connected,
TimeSpan.FromSeconds(1), onStateLeft, onStateReached);
+ await uut.DelayedStateMonitor(ProducerState.Connected,
TimeSpan.FromSeconds(1), onStateLeft, onStateReached,
Current.CancellationToken);
// Assert
stateLeft.HasValue.ShouldBeTrue();
diff --git a/tests/DotPulsar.Tests/InlineAutoDataAttribute.cs
b/tests/DotPulsar.Tests/InlineAutoDataAttribute.cs
index 52a19c2..fa10426 100644
--- a/tests/DotPulsar.Tests/InlineAutoDataAttribute.cs
+++ b/tests/DotPulsar.Tests/InlineAutoDataAttribute.cs
@@ -14,7 +14,11 @@
namespace DotPulsar.Tests;
-public class InlineAutoDataAttribute :
AutoFixture.Xunit2.InlineAutoDataAttribute
+using AutoFixture;
+using AutoFixture.AutoNSubstitute;
+
+public class InlineAutoDataAttribute :
AutoFixture.Xunit3.InlineAutoDataAttribute
{
- public InlineAutoDataAttribute(params object[] objects) : base(new
AutoDataAttribute(), objects) { }
+ public InlineAutoDataAttribute(params object[] values)
+ : base(() => new Fixture().Customize(new
AutoNSubstituteCustomization()), values) { }
}
diff --git a/tests/DotPulsar.Tests/IntegrationFixture.cs
b/tests/DotPulsar.Tests/IntegrationFixture.cs
index a3e543b..5dba9aa 100644
--- a/tests/DotPulsar.Tests/IntegrationFixture.cs
+++ b/tests/DotPulsar.Tests/IntegrationFixture.cs
@@ -23,8 +23,8 @@ using System.Text;
using System.Text.Json;
using Testcontainers.Pulsar;
using Toxiproxy.Net;
-using Xunit.Abstractions;
using Xunit.Sdk;
+using Xunit.v3;
public class IntegrationFixture : IAsyncLifetime
{
@@ -77,15 +77,16 @@ public class IntegrationFixture : IAsyncLifetime
public IAuthentication Authentication => AuthenticationFactory.Token(ct =>
ValueTask.FromResult(_token!));
- public async Task DisposeAsync()
+ public async ValueTask DisposeAsync()
{
await _pulsarCluster.DisposeAsync();
await _toxiProxy.DisposeAsync();
_toxiProxyConnection.Dispose();
_cts.Dispose();
+ GC.SuppressFinalize(this);
}
- public async Task InitializeAsync()
+ public async ValueTask InitializeAsync()
{
SubscribeToContainerEvents(_toxiProxy, "Toxiproxy");
SubscribeToContainerEvents(_pulsarCluster, "Pulsar cluster");
diff --git a/tests/DotPulsar.Tests/Internal/AsyncLockTests.cs
b/tests/DotPulsar.Tests/Internal/AsyncLockTests.cs
index d4b8932..4900d7b 100644
--- a/tests/DotPulsar.Tests/Internal/AsyncLockTests.cs
+++ b/tests/DotPulsar.Tests/Internal/AsyncLockTests.cs
@@ -75,7 +75,7 @@ public class AsyncLockTests
var sut = new AsyncLock();
var gotLock = await sut.Lock(CancellationToken.None);
var awaiting = sut.Lock(CancellationToken.None);
- _ = Task.Run(async () => await sut.DisposeAsync());
+ _ = Task.Run(async () => await sut.DisposeAsync(),
Current.CancellationToken);
//Act
var exception = await Record.ExceptionAsync(() => awaiting);
@@ -116,7 +116,7 @@ public class AsyncLockTests
//Arrange
var sut = new AsyncLock();
var gotLock = await sut.Lock(CancellationToken.None);
- var disposeTask = Task.Run(async () => await sut.DisposeAsync());
+ var disposeTask = Task.Run(async () => await sut.DisposeAsync(),
Current.CancellationToken);
Assert.False(disposeTask.IsCompleted);
//Act
diff --git a/tests/DotPulsar.Tests/Internal/AsyncQueueTests.cs
b/tests/DotPulsar.Tests/Internal/AsyncQueueTests.cs
index 18fbe24..7adc538 100644
--- a/tests/DotPulsar.Tests/Internal/AsyncQueueTests.cs
+++ b/tests/DotPulsar.Tests/Internal/AsyncQueueTests.cs
@@ -25,7 +25,7 @@ public class AsyncQueueTests
//Arrange
const int expected = 1;
var queue = new AsyncQueue<int>();
- var dequeueTask = queue.Dequeue();
+ var dequeueTask = queue.Dequeue(Current.CancellationToken);
queue.Enqueue(expected);
//Act
@@ -47,7 +47,7 @@ public class AsyncQueueTests
queue.Enqueue(expected);
//Act
- var actual = await queue.Dequeue();
+ var actual = await queue.Dequeue(Current.CancellationToken);
//Assert
actual.ShouldBe(expected);
@@ -62,8 +62,8 @@ public class AsyncQueueTests
//Arrange
const int expected1 = 1, expected2 = 2;
var queue = new AsyncQueue<int>();
- var dequeue1 = queue.Dequeue();
- var dequeue2 = queue.Dequeue();
+ var dequeue1 = queue.Dequeue(Current.CancellationToken);
+ var dequeue2 = queue.Dequeue(Current.CancellationToken);
queue.Enqueue(expected1);
queue.Enqueue(expected2);
@@ -89,8 +89,8 @@ public class AsyncQueueTests
queue.Enqueue(expected2);
//Act
- var actual1 = await queue.Dequeue();
- var actual2 = await queue.Dequeue();
+ var actual1 = await queue.Dequeue(Current.CancellationToken);
+ var actual2 = await queue.Dequeue(Current.CancellationToken);
//Assert
actual1.ShouldBe(expected1);
diff --git a/tests/DotPulsar.Tests/Internal/ConsumerTests.cs
b/tests/DotPulsar.Tests/Internal/ConsumerTests.cs
index b617d5c..ea908ad 100644
--- a/tests/DotPulsar.Tests/Internal/ConsumerTests.cs
+++ b/tests/DotPulsar.Tests/Internal/ConsumerTests.cs
@@ -22,7 +22,6 @@ using DotPulsar.Tests.Schemas.TestSamples.AvroModels;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
-using Xunit.Abstractions;
[Collection("Integration"), Trait("Category", "Integration")]
public sealed class ConsumerTests : IDisposable
@@ -293,7 +292,7 @@ public sealed class ConsumerTests : IDisposable
await producer.Send(new ValidModel(), _cts.Token);
//Act
- var exception = await Record.ExceptionAsync(consumer.Receive().AsTask);
+ var exception = await
Record.ExceptionAsync(consumer.Receive(Current.CancellationToken).AsTask);
//Assert
exception.ShouldBeOfType<IncompatibleSchemaException>();
diff --git a/tests/DotPulsar.Tests/Internal/MessageProcessorTests.cs
b/tests/DotPulsar.Tests/Internal/MessageProcessorTests.cs
index 26ffc6d..b3047ed 100644
--- a/tests/DotPulsar.Tests/Internal/MessageProcessorTests.cs
+++ b/tests/DotPulsar.Tests/Internal/MessageProcessorTests.cs
@@ -39,12 +39,12 @@ public sealed class MessageProcessorTests : IDisposable
[InlineAutoData(SubscriptionType.KeyShared)]
public void
Constructor_GivenSharedSubscriptionTypeWithOrderedAcknowledgment_ShouldThrowProcessingException(
SubscriptionType subscriptionType,
- [AutoFixture.Xunit2.Frozen] IConsumer<byte[]> consumer,
+ [AutoFixture.Xunit3.Frozen] IConsumer<byte[]> consumer,
ProcessingOptions options)
{
//Arrange
consumer.SubscriptionType.Returns(subscriptionType);
- ValueTask ProcessMessage(IMessage<byte[]> _1, CancellationToken _2) =>
ValueTask.CompletedTask;
+ static ValueTask ProcessMessage(IMessage<byte[]> _1, CancellationToken
_2) => ValueTask.CompletedTask;
//Act
var exception = Record.Exception(() => new
MessageProcessor<byte[]>(consumer, ProcessMessage, options));
@@ -55,7 +55,7 @@ public sealed class MessageProcessorTests : IDisposable
[Theory, AutoData]
public async Task
Process_GivenNoShutdownGracePeriod_ShouldNotLetTaskComplete(
- [AutoFixture.Xunit2.Frozen] IConsumer<byte[]> consumer,
+ [AutoFixture.Xunit3.Frozen] IConsumer<byte[]> consumer,
ProcessingOptions options)
{
//Arrange
@@ -63,7 +63,7 @@ public sealed class MessageProcessorTests : IDisposable
var uut = new MessageProcessor<byte[]>(consumer, ProcessMessage,
options);
//Act
- await _semaphore.WaitAsync();
+ await _semaphore.WaitAsync(Current.CancellationToken);
var processTask = uut.Process(_cts.Token).AsTask();
while (!_taskHasStarted) { }
_cts.Cancel();
@@ -76,7 +76,7 @@ public sealed class MessageProcessorTests : IDisposable
[Theory, AutoData]
public async Task Process_GivenShutdownGracePeriod_ShouldLetTaskComplete(
- [AutoFixture.Xunit2.Frozen] IConsumer<byte[]> consumer,
+ [AutoFixture.Xunit3.Frozen] IConsumer<byte[]> consumer,
ProcessingOptions options)
{
//Arrange
@@ -85,7 +85,7 @@ public sealed class MessageProcessorTests : IDisposable
var uut = new MessageProcessor<byte[]>(consumer, ProcessMessage,
options);
//Act
- await _semaphore.WaitAsync();
+ await _semaphore.WaitAsync(Current.CancellationToken);
var processTask = uut.Process(_cts.Token).AsTask();
while (!_taskHasStarted) { }
_cts.Cancel();
diff --git a/tests/DotPulsar.Tests/Internal/PingPongHandlerTest.cs
b/tests/DotPulsar.Tests/Internal/PingPongHandlerTest.cs
index 32d621a..6cdb35c 100644
--- a/tests/DotPulsar.Tests/Internal/PingPongHandlerTest.cs
+++ b/tests/DotPulsar.Tests/Internal/PingPongHandlerTest.cs
@@ -27,7 +27,7 @@ public class PingPongHandlerTest
var uut = new PingPongHandler(TimeSpan.FromSeconds(1));
// Act
- var actual = await
uut.State.OnStateChangeTo(PingPongHandlerState.TimedOut);
+ var actual = await
uut.State.OnStateChangeTo(PingPongHandlerState.TimedOut,
Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -41,9 +41,9 @@ public class PingPongHandlerTest
var uut = new PingPongHandler(TimeSpan.FromSeconds(1));
// Act
- _ = await
uut.State.OnStateChangeTo(PingPongHandlerState.ThresholdExceeded);
+ _ = await
uut.State.OnStateChangeTo(PingPongHandlerState.ThresholdExceeded,
Current.CancellationToken);
uut.Incoming(DotPulsar.Internal.PulsarApi.BaseCommand.Types.Type.Ack);
- var actual = await
uut.State.OnStateChangeTo(PingPongHandlerState.Active);
+ var actual = await
uut.State.OnStateChangeTo(PingPongHandlerState.Active,
Current.CancellationToken);
// Assert
actual.ShouldBe(expected);
@@ -57,7 +57,7 @@ public class PingPongHandlerTest
var uut = new PingPongHandler(TimeSpan.FromSeconds(1));
// Act
- var actual = uut.State.OnStateChangeTo(PingPongHandlerState.Closed);
+ var actual = uut.State.OnStateChangeTo(PingPongHandlerState.Closed,
Current.CancellationToken);
await uut.DisposeAsync();
// Assert
diff --git a/tests/DotPulsar.Tests/Internal/ProducerTests.cs
b/tests/DotPulsar.Tests/Internal/ProducerTests.cs
index 00f2957..50b202b 100644
--- a/tests/DotPulsar.Tests/Internal/ProducerTests.cs
+++ b/tests/DotPulsar.Tests/Internal/ProducerTests.cs
@@ -19,7 +19,6 @@ using DotPulsar.Abstractions;
using DotPulsar.Extensions;
using DotPulsar.Tests.Schemas.TestSamples.AvroModels;
using System.Text;
-using Xunit.Abstractions;
[Collection("Integration"), Trait("Category", "Integration")]
public sealed class ProducerTests : IDisposable
diff --git a/tests/DotPulsar.Tests/Internal/ReaderTests.cs
b/tests/DotPulsar.Tests/Internal/ReaderTests.cs
index 2631cfd..836252e 100644
--- a/tests/DotPulsar.Tests/Internal/ReaderTests.cs
+++ b/tests/DotPulsar.Tests/Internal/ReaderTests.cs
@@ -17,7 +17,6 @@ namespace DotPulsar.Tests.Internal;
using DotPulsar.Abstractions;
using DotPulsar.Exceptions;
using DotPulsar.Extensions;
-using Xunit.Abstractions;
[Collection("Integration"), Trait("Category", "Integration")]
public sealed class ReaderTests : IDisposable
diff --git a/tests/DotPulsar.Tests/Internal/StateManagerTests.cs
b/tests/DotPulsar.Tests/Internal/StateManagerTests.cs
index 367942b..584be2a 100644
--- a/tests/DotPulsar.Tests/Internal/StateManagerTests.cs
+++ b/tests/DotPulsar.Tests/Internal/StateManagerTests.cs
@@ -66,7 +66,7 @@ public class StateManagerTests
{
//Arrange
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
- var task = uut.OnStateChangeTo(newState, default);
+ var task = uut.OnStateChangeTo(newState, Current.CancellationToken);
//Act
_ = uut.SetState(newState);
@@ -84,7 +84,7 @@ public class StateManagerTests
{
//Arrange
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
- var task = uut.OnStateChangeFrom(initialState, default);
+ var task = uut.OnStateChangeFrom(initialState,
Current.CancellationToken);
//Act
_ = uut.SetState(newState);
@@ -103,7 +103,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(state, ProducerState.Closed);
//Act
- var task = uut.OnStateChangeTo(state, default);
+ var task = uut.OnStateChangeTo(state, Current.CancellationToken);
//Assert
Assert.True(task.IsCompleted);
@@ -120,7 +120,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeTo(wantedState, default);
+ var task = uut.OnStateChangeTo(wantedState, Current.CancellationToken);
//Assert
task.IsCompleted.ShouldBeFalse();
@@ -135,7 +135,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(ProducerState.Closed,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeTo(state, default);
+ var task = uut.OnStateChangeTo(state, Current.CancellationToken);
//Assert
task.IsCompleted.ShouldBeTrue();
@@ -150,7 +150,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(state, ProducerState.Closed);
//Act
- var task = uut.OnStateChangeFrom(state, default);
+ var task = uut.OnStateChangeFrom(state, Current.CancellationToken);
//Assert
task.IsCompleted.ShouldBeFalse();
@@ -167,7 +167,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeFrom(fromState, default);
+ var task = uut.OnStateChangeFrom(fromState, Current.CancellationToken);
//Assert
task.IsCompleted.ShouldBeTrue();
@@ -183,7 +183,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(ProducerState.Closed,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeFrom(state, default);
+ var task = uut.OnStateChangeFrom(state, Current.CancellationToken);
//Assert
task.IsCompleted.ShouldBeTrue();
@@ -198,7 +198,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeTo(wantedState, default);
+ var task = uut.OnStateChangeTo(wantedState, Current.CancellationToken);
_ = uut.SetState(ProducerState.Closed);
//Assert
@@ -214,7 +214,7 @@ public class StateManagerTests
var uut = new StateManager<ProducerState>(initialState,
ProducerState.Closed);
//Act
- var task = uut.OnStateChangeTo(wantedState, default);
+ var task = uut.OnStateChangeTo(wantedState, Current.CancellationToken);
_ = uut.SetState(newState);
//Assert
diff --git a/tests/DotPulsar.Tests/PulsarClientTests.cs
b/tests/DotPulsar.Tests/PulsarClientTests.cs
index d76fb86..c6e57d6 100644
--- a/tests/DotPulsar.Tests/PulsarClientTests.cs
+++ b/tests/DotPulsar.Tests/PulsarClientTests.cs
@@ -17,7 +17,6 @@ namespace DotPulsar.Tests;
using DotPulsar.Abstractions;
using DotPulsar.Exceptions;
using DotPulsar.Extensions;
-using Xunit.Abstractions;
[Collection("Integration"), Trait("Category", "Integration")]
public sealed class PulsarClientTests : IDisposable
diff --git a/tests/DotPulsar.Tests/TestOutputHelperExtensions.cs
b/tests/DotPulsar.Tests/TestOutputHelperExtensions.cs
index 4202d65..a223a6e 100644
--- a/tests/DotPulsar.Tests/TestOutputHelperExtensions.cs
+++ b/tests/DotPulsar.Tests/TestOutputHelperExtensions.cs
@@ -14,8 +14,6 @@
namespace DotPulsar.Tests;
-using Xunit.Abstractions;
-
public static class TestOutputHelperExtensions
{
public static void Log(this ITestOutputHelper helper, string message)