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 4a05f01 Added traits to tests. Now using Pulsar 3.1.3 for tests 4a05f01 is described below commit 4a05f019a0b0cd008d63d3d1533776e50e49770f Author: Daniel Blankensteiner <d...@vmail.dk> AuthorDate: Tue Apr 23 15:25:08 2024 +0200 Added traits to tests. Now using Pulsar 3.1.3 for tests --- tests/DotPulsar.Tests/IntegrationFixture.cs | 10 +++++----- .../DotPulsar.Tests/Internal/RoundRobinPartitionRouterTests.cs | 3 ++- tests/DotPulsar.Tests/Internal/SinglePartitionRouterTests.cs | 3 ++- tests/DotPulsar.Tests/PulsarClientTests.cs | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/DotPulsar.Tests/IntegrationFixture.cs b/tests/DotPulsar.Tests/IntegrationFixture.cs index 9dec12f..cf882d9 100644 --- a/tests/DotPulsar.Tests/IntegrationFixture.cs +++ b/tests/DotPulsar.Tests/IntegrationFixture.cs @@ -78,7 +78,7 @@ public class IntegrationFixture : IAsyncLifetime .Build(); _pulsarCluster = new ContainerBuilder() - .WithImage("apachepulsar/pulsar:3.1.1") + .WithImage("apachepulsar/pulsar:3.1.3") .WithEnvironment(environmentVariables) .WithHostname("pulsar") .WithNetwork(_network) @@ -153,12 +153,12 @@ public class IntegrationFixture : IAsyncLifetime if (expiryTime != Timeout.InfiniteTimeSpan) arguments += $" --expiry-time {expiryTime.TotalSeconds}s"; - var result = await _pulsarCluster.ExecAsync(new[] { "/bin/bash", "-c", arguments }, cancellationToken); + var result = await _pulsarCluster.ExecAsync(["/bin/bash", "-c", arguments], cancellationToken); if (result.ExitCode != 0) throw new InvalidOperationException($"Could not create the token: {result.Stderr}"); - return result.Stdout; + return result.Stdout.Trim(); } private static string CreateTopicName() => $"persistent://public/default/{Guid.NewGuid():N}"; @@ -174,7 +174,7 @@ public class IntegrationFixture : IAsyncLifetime { var arguments = $"bin/pulsar-admin topics create {topic}"; - var result = await _pulsarCluster.ExecAsync(new[] { "/bin/bash", "-c", arguments }, cancellationToken); + var result = await _pulsarCluster.ExecAsync(["/bin/bash", "-c", arguments], cancellationToken); if (result.ExitCode != 0) throw new Exception($"Could not create the topic: {result.Stderr}"); @@ -191,7 +191,7 @@ public class IntegrationFixture : IAsyncLifetime { var arguments = $"bin/pulsar-admin topics create-partitioned-topic {topic} -p {numberOfPartitions}"; - var result = await _pulsarCluster.ExecAsync(new[] { "/bin/bash", "-c", arguments }, cancellationToken); + var result = await _pulsarCluster.ExecAsync(["/bin/bash", "-c", arguments], cancellationToken); if (result.ExitCode != 0) throw new Exception($"Could not create the partitioned topic: {result.Stderr}"); diff --git a/tests/DotPulsar.Tests/Internal/RoundRobinPartitionRouterTests.cs b/tests/DotPulsar.Tests/Internal/RoundRobinPartitionRouterTests.cs index 681cae0..81181b4 100644 --- a/tests/DotPulsar.Tests/Internal/RoundRobinPartitionRouterTests.cs +++ b/tests/DotPulsar.Tests/Internal/RoundRobinPartitionRouterTests.cs @@ -1,5 +1,6 @@ -namespace DotPulsar.Tests.Internal; +namespace DotPulsar.Tests.Internal; +[Trait("Category", "Unit")] public class RoundRobinPartitionRouterTests { [Fact] diff --git a/tests/DotPulsar.Tests/Internal/SinglePartitionRouterTests.cs b/tests/DotPulsar.Tests/Internal/SinglePartitionRouterTests.cs index 0a86ce1..899b258 100644 --- a/tests/DotPulsar.Tests/Internal/SinglePartitionRouterTests.cs +++ b/tests/DotPulsar.Tests/Internal/SinglePartitionRouterTests.cs @@ -1,5 +1,6 @@ -namespace DotPulsar.Tests.Internal; +namespace DotPulsar.Tests.Internal; +[Trait("Category", "Unit")] public class SinglePartitionRouterTests { [Fact] diff --git a/tests/DotPulsar.Tests/PulsarClientTests.cs b/tests/DotPulsar.Tests/PulsarClientTests.cs index f90e8c8..77b924a 100644 --- a/tests/DotPulsar.Tests/PulsarClientTests.cs +++ b/tests/DotPulsar.Tests/PulsarClientTests.cs @@ -59,7 +59,7 @@ public sealed class PulsarClientTests : IDisposable if (throwException) throw new Exception(); var token = await _fixture.CreateToken(TimeSpan.FromSeconds(10), _cts.Token); - _testOutputHelper.Log($"Received token: {token}"); + _testOutputHelper.Log($"Received token: '{token}'"); return token; }); @@ -110,7 +110,7 @@ public sealed class PulsarClientTests : IDisposable tcs.SetResult(); var token = await _fixture.CreateToken(TimeSpan.FromSeconds(10), _cts.Token); - _testOutputHelper.Log($"Received token: {token}"); + _testOutputHelper.Log($"Received token: '{token}'"); return token; });