From 87bd676cee07e8eac53f94a6d5e00dd023e356bb Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Thu, 14 May 2026 11:55:27 -0400 Subject: [PATCH 1/2] chore(projections): remove debug log markers Signed-off-by: Yordis Prieto --- .../Services/Management/ProjectionManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EventStore.Projections.Core/Services/Management/ProjectionManager.cs b/src/EventStore.Projections.Core/Services/Management/ProjectionManager.cs index b8ee722fb..4b71c5a80 100644 --- a/src/EventStore.Projections.Core/Services/Management/ProjectionManager.cs +++ b/src/EventStore.Projections.Core/Services/Management/ProjectionManager.cs @@ -554,7 +554,7 @@ public void Handle(ProjectionManagementMessage.Command.Enable message) var projection = GetProjection(message.Name); if (projection == null) { - _logger.Error("DBG: PROJECTION *{projection}* NOT FOUND.", message.Name); + _logger.Error("Projection '{projection}' not found.", message.Name); message.Envelope.ReplyWith(new ProjectionManagementMessage.NotFound()); } else @@ -602,12 +602,12 @@ public void Handle(ProjectionManagementMessage.Command.SetRunAs message) return; } - _logger.Information("Setting RunAs1 account for '{projection}' projection", message.Name); + _logger.Information("Setting RunAs account for '{projection}' projection", message.Name); var projection = GetProjection(message.Name); if (projection == null) { - _logger.Error("DBG: PROJECTION *{projection}* NOT FOUND.", message.Name); + _logger.Error("Projection '{projection}' not found.", message.Name); message.Envelope.ReplyWith(new ProjectionManagementMessage.NotFound()); } else @@ -636,7 +636,7 @@ public void Handle(ProjectionManagementMessage.Command.Reset message) var projection = GetProjection(message.Name); if (projection == null) { - _logger.Error("DBG: PROJECTION *{projection}* NOT FOUND.", message.Name); + _logger.Error("Projection '{projection}' not found.", message.Name); message.Envelope.ReplyWith(new ProjectionManagementMessage.NotFound()); } else From c0100c803ef223dae42cadb026aac9a523bfddeb Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Thu, 14 May 2026 12:37:44 -0400 Subject: [PATCH 2/2] fix(tests): wait for tcp endpoint before invalid data check Signed-off-by: Yordis Prieto --- .../Tcp/when_invalid_data_is_sent_over_tcp.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/EventStore.Core.Tests/Services/Transport/Tcp/when_invalid_data_is_sent_over_tcp.cs b/src/EventStore.Core.Tests/Services/Transport/Tcp/when_invalid_data_is_sent_over_tcp.cs index 25d75c664..c2bd962cd 100644 --- a/src/EventStore.Core.Tests/Services/Transport/Tcp/when_invalid_data_is_sent_over_tcp.cs +++ b/src/EventStore.Core.Tests/Services/Transport/Tcp/when_invalid_data_is_sent_over_tcp.cs @@ -21,6 +21,8 @@ public class when_invalid_data_is_sent_over_tcp : specifi public async Task connection_should_be_closed_by_remote_party(string endpointProperty, bool secure) { IPEndPoint endpoint = (IPEndPoint)_nodes[0].GetType().GetProperty(endpointProperty).GetValue(_nodes[0], null); + await WaitForEndpoint(endpoint); + var closedEvent = new ManualResetEventSlim(); TaskCompletionSource connectionResult = new(TaskCreationOptions.RunContinuationsAsynchronously); @@ -64,4 +66,26 @@ public async Task connection_should_be_closed_by_remote_party(string endpointPro Assert.True(closedEvent.Wait(10000)); connection.Close("intentional close"); } + + private static async Task WaitForEndpoint(IPEndPoint endpoint) + { + using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(5)); + + while (!timeout.IsCancellationRequested) + { + using var client = new TcpClient(); + + try + { + await client.ConnectAsync(endpoint.Address, endpoint.Port, timeout.Token); + return; + } + catch (Exception ex) when (ex is SocketException or OperationCanceledException) + { + await Task.Delay(100, CancellationToken.None); + } + } + + throw new TimeoutException($"TCP endpoint {endpoint} did not accept connections before the test timeout."); + } }