fix: resolve slopwatch issues — add logging to empty catches and eliminate test timing delays

Replace empty catch blocks with meaningful log statements in NatsServer,
NatsClient, and Program. Add WaitForReadyAsync() to NatsServer for
deterministic server startup. Replace Task.Delay/Thread.Sleep in tests
with PING/PONG protocol flush and SubscribeCoreAsync for reliable
subscription synchronization.
This commit is contained in:
Joseph Doherty
2026-02-22 21:14:16 -05:00
parent 539b2b7588
commit 2e1e1bb341
6 changed files with 93 additions and 105 deletions

View File

@@ -40,7 +40,10 @@ try
{
await server.StartAsync(cts.Token);
}
catch (OperationCanceledException) { }
catch (OperationCanceledException)
{
Log.Information("Server shutdown requested");
}
finally
{
Log.CloseAndFlush();