From 35c494ea0093d113afcbbdcf3115e4e4b8948cb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 07:16:04 +0000 Subject: [PATCH 1/3] Initial plan From a6a27d71a702faa11836fb8a000a0c6af6d8e572 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 07:28:59 +0000 Subject: [PATCH 2/3] Log current SocksProxyTest case name Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/a0c02358-15f1-4e45-aa85-eef2df0d3d7b Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com> --- .../src/test/java/quickfix/mina/SocksProxyTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java b/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java index 88459bb59..9e7d509b7 100644 --- a/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java +++ b/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java @@ -3,7 +3,11 @@ import org.apache.mina.util.AvailablePortFinder; import org.junit.After; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import quickfix.Acceptor; import quickfix.ApplicationAdapter; import quickfix.ConfigError; @@ -28,13 +32,19 @@ */ public class SocksProxyTest { + private static final Logger LOGGER = LoggerFactory.getLogger(SocksProxyTest.class); + // maximum time to wait for session logon private static final long TIMEOUT_SECONDS = 5; + @Rule + public TestName testName = new TestName(); + private SocksProxyServer proxyServer; @Before public void setUp() { + LOGGER.info("Starting test {}.{}", getClass().getSimpleName(), testName.getMethodName()); int proxyPort = AvailablePortFinder.getNextAvailable(); proxyServer = new SocksProxyServer(proxyPort); @@ -46,6 +56,8 @@ public void tearDown() { if (proxyServer != null) { proxyServer.stop(); } + + LOGGER.info("Finished test {}.{}", getClass().getSimpleName(), testName.getMethodName()); } @Test From 91f527ced75bd019fe64a6cbb3c618757c8754ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 07:29:50 +0000 Subject: [PATCH 3/3] Harden SocksProxyTest log naming Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/a0c02358-15f1-4e45-aa85-eef2df0d3d7b Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com> --- .../test/java/quickfix/mina/SocksProxyTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java b/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java index 9e7d509b7..9b1216349 100644 --- a/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java +++ b/quickfixj-core/src/test/java/quickfix/mina/SocksProxyTest.java @@ -44,7 +44,7 @@ public class SocksProxyTest { @Before public void setUp() { - LOGGER.info("Starting test {}.{}", getClass().getSimpleName(), testName.getMethodName()); + LOGGER.info("Starting test {}", getCurrentTestName()); int proxyPort = AvailablePortFinder.getNextAvailable(); proxyServer = new SocksProxyServer(proxyPort); @@ -57,7 +57,7 @@ public void tearDown() { proxyServer.stop(); } - LOGGER.info("Finished test {}.{}", getClass().getSimpleName(), testName.getMethodName()); + LOGGER.info("Finished test {}", getCurrentTestName()); } @Test @@ -125,6 +125,16 @@ private boolean isLoggedOn(SessionConnector connector, SessionID sessionID) { return session.isLoggedOn(); } + private String getCurrentTestName() { + String methodName = testName.getMethodName(); + + if (methodName == null) { + return getClass().getSimpleName(); + } + + return getClass().getSimpleName() + "." + methodName; + } + private SessionConnector createAcceptor(int port) throws ConfigError { MessageStoreFactory messageStoreFactory = new MemoryStoreFactory(); MessageFactory messageFactory = new DefaultMessageFactory();