Skip to content

Commit

Permalink
Suggested fixes to interfaces (#297)
Browse files Browse the repository at this point in the history
* Suggested fixes to interfaces

* Additional Adjustments

* missed blank line between properties

* Fix to .editorconfig and referenced files.
Made HeaderParser internal and removed it from the interface.

* Removed EnumeratorCancellation

* Adjustments to meet requested changes.
  • Loading branch information
sspates authored Jan 10, 2024
1 parent a3f4df6 commit 7981db6
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 30 deletions.
82 changes: 78 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[*]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
Expand All @@ -16,15 +16,15 @@ indent_size = 4
max_line_length = 300

# changes from VS2019 defaults
csharp_style_namespace_declarations = file_scoped
csharp_style_namespace_declarations = file_scoped:silent

# changes from VS2017 defaults
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_prefer_braces = false:none
csharp_indent_switch_labels = false
csharp_space_after_cast = true
csharp_space_after_cast = false
csharp_preserve_single_line_statements = false

# use VS2017 defaults, but make them warnings (instead of none)
Expand Down Expand Up @@ -52,7 +52,7 @@ csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_inlined_variable_declaration = true
csharp_prefer_simple_default_expression = true
csharp_style_throw_expression = true
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true
dotnet_sort_system_directives_first = true
csharp_new_line_before_open_brace = all
Expand Down Expand Up @@ -281,3 +281,77 @@ dotnet_diagnostic.VSTHRD100.severity = none # Avoid async void
dotnet_diagnostic.VSTHRD101.severity = none # Avoid unsupported async delegates
dotnet_diagnostic.VSTHRD003.severity = none # Avoid awaiting foreign Tasks
dotnet_diagnostic.VSTHRD111.severity = error # Use ConfigureAwait(bool)
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_space_around_binary_operators = before_and_after

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:warning
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
13 changes: 12 additions & 1 deletion src/NATS.Client.Core/INatsConnection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
namespace NATS.Client.Core;

public interface INatsConnection
public interface INatsConnection : IAsyncDisposable
{
INatsServerInfo? ServerInfo { get; }

NatsOpts Opts { get; }

NatsConnectionState ConnectionState { get; }

/// <summary>
/// Send PING command and await PONG. Return value is similar as Round Trip Time (RTT).
/// </summary>
Expand Down Expand Up @@ -154,4 +160,9 @@ IAsyncEnumerable<NatsMsg<TReply>> RequestManyAsync<TRequest, TReply>(
NatsPubOpts? requestOpts = default,
NatsSubOpts? replyOpts = default,
CancellationToken cancellationToken = default);

/// <summary>
/// Connect socket and write CONNECT command to nats server.
/// </summary>
ValueTask ConnectAsync();
}
34 changes: 17 additions & 17 deletions src/NATS.Client.Core/NatsConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public enum NatsConnectionState
Reconnecting,
}

public partial class NatsConnection : IAsyncDisposable, INatsConnection
public partial class NatsConnection : INatsConnection
{
#pragma warning disable SA1401
/// <summary>
Expand All @@ -25,6 +25,8 @@ public partial class NatsConnection : IAsyncDisposable, INatsConnection

internal readonly ConnectionStatsCounter Counter; // allow to call from external sources
internal ServerInfo? WritableServerInfo;
internal bool IsDisposed;

#pragma warning restore SA1401
private readonly object _gate = new object();
private readonly WriterState _writerState;
Expand All @@ -36,12 +38,11 @@ public partial class NatsConnection : IAsyncDisposable, INatsConnection
private readonly string _name;
private readonly TimeSpan _socketComponentDisposeTimeout = TimeSpan.FromSeconds(5);
private readonly BoundedChannelOptions _defaultSubscriptionChannelOpts;

private readonly ClientOpts _clientOpts;
private int _pongCount;
private bool _isDisposed;
private int _connectionState;

// when reconnect, make new instance.
// when reconnected, make new instance.
private ISocketConnection? _socket;
private CancellationTokenSource? _pingTimerCancellationTokenSource;
private volatile NatsUri? _currentConnectUri;
Expand All @@ -50,7 +51,6 @@ public partial class NatsConnection : IAsyncDisposable, INatsConnection
private NatsPipeliningWriteProtocolProcessor? _socketWriter;
private TaskCompletionSource _waitForOpenConnection;
private TlsCerts? _tlsCerts;
private ClientOpts _clientOpts;
private UserCredentials? _userCredentials;
private int _connectRetry;
private TimeSpan _backoff = TimeSpan.Zero;
Expand Down Expand Up @@ -107,7 +107,7 @@ public NatsConnectionState ConnectionState

public INatsServerInfo? ServerInfo => WritableServerInfo; // server info is set when received INFO

public NatsHeaderParser HeaderParser { get; }
internal NatsHeaderParser HeaderParser { get; }

internal SubscriptionManager SubscriptionManager { get; }

Expand Down Expand Up @@ -150,13 +150,13 @@ public async ValueTask ConnectAsync()
}
}

public NatsStats GetStats() => Counter.ToStats();
internal NatsStats GetStats() => Counter.ToStats();

public async ValueTask DisposeAsync()
public virtual async ValueTask DisposeAsync()

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (release/v2.9.23)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / test (release/v2.9.23)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

Check warning on line 155 in src/NATS.Client.Core/NatsConnection.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

{
if (!_isDisposed)
if (!IsDisposed)
{
_isDisposed = true;
IsDisposed = true;
_logger.Log(LogLevel.Information, NatsLogEvents.Connection, "Disposing connection {Name}", _name);

await DisposeSocketAsync(false).ConfigureAwait(false);
Expand Down Expand Up @@ -237,7 +237,7 @@ internal ValueTask UnsubscribeAsync(int sid)
catch (Exception ex)
{
// connection is disposed, don't need to unsubscribe command.
if (_isDisposed)
if (IsDisposed)
{
return ValueTask.CompletedTask;
}
Expand Down Expand Up @@ -526,9 +526,9 @@ private async void ReconnectLoop()

var defaultScheme = _currentConnectUri!.Uri.Scheme;
var urls = (Opts.NoRandomize
? WritableServerInfo?.ClientConnectUrls?.Select(x => new NatsUri(x, false, defaultScheme)).Distinct().ToArray()
: WritableServerInfo?.ClientConnectUrls?.Select(x => new NatsUri(x, false, defaultScheme)).OrderBy(_ => Guid.NewGuid()).Distinct().ToArray())
?? Array.Empty<NatsUri>();
? WritableServerInfo?.ClientConnectUrls?.Select(x => new NatsUri(x, false, defaultScheme)).Distinct().ToArray()
: WritableServerInfo?.ClientConnectUrls?.Select(x => new NatsUri(x, false, defaultScheme)).OrderBy(_ => Guid.NewGuid()).Distinct().ToArray())
?? Array.Empty<NatsUri>();
if (urls.Length == 0)
urls = Opts.GetSeedUris();

Expand All @@ -538,7 +538,7 @@ private async void ReconnectLoop()
_currentConnectUri = null;
var urlEnumerator = urls.AsEnumerable().GetEnumerator();
NatsUri? url = null;
CONNECT_AGAIN:
CONNECT_AGAIN:
try
{
if (urlEnumerator.MoveNext())
Expand Down Expand Up @@ -748,7 +748,7 @@ private void EnqueueCommandSync(ICommand command)

private async ValueTask EnqueueCommandAsync(ICommand command)
{
RETRY:
RETRY:
if (_commandWriter.TryWrite(command))
{
Interlocked.Increment(ref Counter.PendingMessages);
Expand Down Expand Up @@ -812,7 +812,7 @@ private async ValueTask DisposeSocketAsync(bool asyncReaderDispose)

private void ThrowIfDisposed()
{
if (_isDisposed)
if (IsDisposed)
throw new ObjectDisposedException(null);
}

Expand Down
10 changes: 5 additions & 5 deletions src/NATS.Client.Core/NatsConnectionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace NATS.Client.Core;

public sealed class NatsConnectionPool : INatsConnectionPool
{
private readonly NatsConnection[] _connections;
private readonly NatsPooledConnection[] _connections;
private int _index = -1;

public NatsConnectionPool()
Expand All @@ -28,11 +28,11 @@ public NatsConnectionPool(int poolSize, NatsOpts opts)
public NatsConnectionPool(int poolSize, NatsOpts opts, Action<NatsConnection> configureConnection)
{
poolSize = Math.Max(1, poolSize);
_connections = new NatsConnection[poolSize];
_connections = new NatsPooledConnection[poolSize];
for (var i = 0; i < _connections.Length; i++)
{
var name = (opts.Name == null) ? $"#{i}" : $"{opts.Name}#{i}";
var conn = new NatsConnection(opts with { Name = name });
var name = opts.Name == null ? $"#{i}" : $"{opts.Name}#{i}";
var conn = new NatsPooledConnection(opts with { Name = name });
configureConnection(conn);
_connections[i] = conn;
}
Expand All @@ -56,7 +56,7 @@ public async ValueTask DisposeAsync()
{
foreach (var item in _connections)
{
await item.DisposeAsync().ConfigureAwait(false);
await item.ForceDisposeAsync().ConfigureAwait(false);
}
}
}
13 changes: 13 additions & 0 deletions src/NATS.Client.Core/NatsPooledConnection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace NATS.Client.Core;

internal sealed class NatsPooledConnection : NatsConnection
{
public NatsPooledConnection(NatsOpts opts)
: base(opts)
{
}

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;

internal ValueTask ForceDisposeAsync() => base.DisposeAsync();
}
8 changes: 8 additions & 0 deletions src/NATS.Client.JetStream/INatsJSContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,12 @@ ValueTask<NatsJSStream> UpdateStreamAsync(
IAsyncEnumerable<INatsJSStream> ListStreamsAsync(
string? subject = default,
CancellationToken cancellationToken = default);

/// <summary>
/// List stream names.
/// </summary>
/// <param name="subject">Limit the list to streams matching this subject filter.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> used to cancel the API call.</param>
/// <returns>Async enumerable list of stream names to be used in a <c>await foreach</c> loop.</returns>
IAsyncEnumerable<string> ListStreamNamesAsync(string? subject = default, CancellationToken cancellationToken = default);
}
35 changes: 35 additions & 0 deletions tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace NATS.Client.Core.Tests;

public class NatsConnectionPoolTest
{
[Fact]
public async Task ConnectionsShouldBeNonDisposable()
{
// Arrange
NatsConnectionPool pool = new(1);

// Act
await using (var con = pool.GetConnection())
{
}

// Assert
var con2 = (NatsConnection) pool.GetConnection();

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 17 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

con2.IsDisposed.Should().BeFalse();
}

[Fact]
public async Task ConnectionsShouldBeDisposedWhenPoolIsDisposed()
{
// Arrange
NatsConnectionPool pool = new(1);

var con = (NatsConnection) pool.GetConnection();

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (release/v2.9.23)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (main)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / dotnet (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (latest)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (main)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)

Operator '(NatsConnection)' should not be followed by whitespace. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md)

Check warning on line 27 in tests/NATS.Client.Core.Tests/NatsConnectionPoolTest.cs

View workflow job for this annotation

GitHub Actions / memory test (release/v2.9.23)


// Act
await pool.DisposeAsync();

// Assert
con.IsDisposed.Should().BeTrue();
}
}
Loading

0 comments on commit 7981db6

Please sign in to comment.