From 3d4321470c055f5291e8f33e1f66f6b211d031aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 01:15:26 +0000 Subject: [PATCH 01/12] Bump org.apache.maven.plugins:maven-jxr-plugin from 3.3.1 to 3.3.2 Bumps [org.apache.maven.plugins:maven-jxr-plugin](https://github.com/apache/maven-jxr) from 3.3.1 to 3.3.2. - [Commits](https://github.com/apache/maven-jxr/compare/jxr-3.3.1...jxr-3.3.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jxr-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- quickfixj-base/pom.xml | 2 +- quickfixj-core/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quickfixj-base/pom.xml b/quickfixj-base/pom.xml index 4c2a7eb601..8f17ef5af8 100644 --- a/quickfixj-base/pom.xml +++ b/quickfixj-base/pom.xml @@ -229,7 +229,7 @@ maven-jxr-plugin - 3.3.1 + 3.3.2 diff --git a/quickfixj-core/pom.xml b/quickfixj-core/pom.xml index b7aafd9eae..b07c0d3dc6 100644 --- a/quickfixj-core/pom.xml +++ b/quickfixj-core/pom.xml @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-jxr-plugin - 3.3.1 + 3.3.2 From ff05e55518b88c5567c13da1da6632023b333aa7 Mon Sep 17 00:00:00 2001 From: ChoiJunsik <2318ws@naver.com> Date: Sun, 7 Jan 2024 16:05:52 +0900 Subject: [PATCH 02/12] [Feature request] add function removeSection in SessionSettings --- .../main/java/quickfix/SessionSettings.java | 18 ++++++++ .../java/quickfix/SessionSettingsTest.java | 46 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/quickfixj-core/src/main/java/quickfix/SessionSettings.java b/quickfixj-core/src/main/java/quickfix/SessionSettings.java index 3765c35c1f..de52063503 100644 --- a/quickfixj-core/src/main/java/quickfix/SessionSettings.java +++ b/quickfixj-core/src/main/java/quickfix/SessionSettings.java @@ -877,4 +877,22 @@ public static Set parseRemoteAddresses(String raw) { return result; } + public void removeSection(final SessionID sessionID) throws ConfigError { + Properties properties = getSessionProperties(sessionID); + + if (properties == null) { + throw new ConfigError("Session not found"); + } + sections.remove(sessionID); + } + + public void removeSection(final String propertyKey, final String propertyValue) throws ConfigError { + SessionID sessionIdToRemove = sections.entrySet().stream() + .filter(entry -> propertyValue.equals(entry.getValue().get(propertyKey))) + .map(Map.Entry::getKey) + .findFirst() + .orElseThrow(() -> new ConfigError("Session not found")); + + sections.remove(sessionIdToRemove); + } } diff --git a/quickfixj-core/src/test/java/quickfix/SessionSettingsTest.java b/quickfixj-core/src/test/java/quickfix/SessionSettingsTest.java index 2de5d1ad10..19f468b85a 100644 --- a/quickfixj-core/src/test/java/quickfix/SessionSettingsTest.java +++ b/quickfixj-core/src/test/java/quickfix/SessionSettingsTest.java @@ -31,6 +31,7 @@ import java.util.Iterator; import java.util.Properties; import java.util.Set; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.HashMap; @@ -610,6 +611,51 @@ public void testConcurrentAccess() throws ConfigError, InterruptedException { assertTrue(testHasPassed.get()); } + @Test + public void testRemoveSectionBySessionID() throws ConfigError { + final Map defaultSettings = createDefaultSettings(); + + final Map pricingSection = createPricingSection(); + final SessionID pricingSessionID = new SessionID("FIX.4.2:FOOBAR_PRICING->*"); + + final Map tradingSection = createTradingSection(); + final SessionID tradingSessionID = new SessionID("FIX.4.2:FOOBAR_TRADING->*"); + + final SessionSettings sessionSettings = new SessionSettings(); + sessionSettings.set(new Dictionary(null, defaultSettings)); + sessionSettings.set(pricingSessionID, new Dictionary("sessions", pricingSection)); + sessionSettings.set(tradingSessionID, new Dictionary("sessions", tradingSection)); + + while (sessionSettings.sectionIterator().hasNext()) { + SessionID sessionID = sessionSettings.sectionIterator().next(); + sessionSettings.removeSection(sessionID); + } + + assertFalse(sessionSettings.sectionIterator().hasNext()); + } + + @Test + public void testRemoveSectionByPropertyKey() throws ConfigError { + final Map defaultSettings = createDefaultSettings(); + + final Map tradingSection = createTradingSection(); + final SessionID tradingSessionID = new SessionID("FIX.4.2:FOOBAR_TRADING->*"); + + final SessionSettings sessionSettings = new SessionSettings(); + sessionSettings.set(new Dictionary(null, defaultSettings)); + sessionSettings.set(tradingSessionID, new Dictionary("sessions", tradingSection)); + + sessionSettings.removeSection("SocketAcceptPort", "7566"); + + Set expectedSessionIdSet = new HashSet<>(); + while (sessionSettings.sectionIterator().hasNext()) { + SessionID sessionID = sessionSettings.sectionIterator().next(); + expectedSessionIdSet.add(sessionID); + } + + assertFalse(expectedSessionIdSet.contains(tradingSessionID)); + } + private Map createTradingSection() { final Map tradingSection = new HashMap<>(); tradingSection.put("PersistMessages","Y"); From 2909f7644f3c19b1d8ffa90a7014cef14a0f78ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 01:28:01 +0000 Subject: [PATCH 03/12] Bump slf4j.version from 2.0.10 to 2.0.11 Bumps `slf4j.version` from 2.0.10 to 2.0.11. Updates `org.slf4j:slf4j-jdk14` from 2.0.10 to 2.0.11 Updates `org.slf4j:slf4j-api` from 2.0.10 to 2.0.11 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-jdk14 dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d0ff6336f..1c38f233f7 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ UTF-8 UTF-8 1.8 - 2.0.10 + 2.0.11 4.11.0 2.2 5.10.1 From 412776fa9d0c060b51f6d195cbe7c7e5d186b758 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 01:19:00 +0000 Subject: [PATCH 04/12] Bump maven-surefire-plugin-version from 3.2.3 to 3.2.5 Bumps `maven-surefire-plugin-version` from 3.2.3 to 3.2.5. Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.2.3 to 3.2.5 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.3...surefire-3.2.5) Updates `org.apache.maven.plugins:maven-surefire-report-plugin` from 3.2.3 to 3.2.5 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.3...surefire-3.2.5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.plugins:maven-surefire-report-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c38f233f7..fa8bebe930 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 3.3.1 3.12.1 3.3.0 - 3.2.3 + 3.2.5 3.21.2 3.3.0 3.6.3 From 14e1749eff5df94a64c2242ebaa9ddc093a12bbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 01:29:54 +0000 Subject: [PATCH 05/12] Bump org.apache.maven.plugins:maven-plugin-plugin from 3.10.2 to 3.11.0 Bumps [org.apache.maven.plugins:maven-plugin-plugin](https://github.com/apache/maven-plugin-tools) from 3.10.2 to 3.11.0. - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.10.2...maven-plugin-tools-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-plugin-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- quickfixj-codegenerator/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fa8bebe930..707df5cd36 100644 --- a/pom.xml +++ b/pom.xml @@ -467,7 +467,7 @@ maven-plugin-plugin - 3.10.2 + 3.11.0 maven-install-plugin diff --git a/quickfixj-codegenerator/pom.xml b/quickfixj-codegenerator/pom.xml index 0bb96d8ca8..ff2d806018 100644 --- a/quickfixj-codegenerator/pom.xml +++ b/quickfixj-codegenerator/pom.xml @@ -78,7 +78,7 @@ maven-plugin-plugin - 3.10.2 + 3.11.0 From 28d4587c235ee4fac6270f32c81e65c6fd86a21d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 01:30:00 +0000 Subject: [PATCH 06/12] Bump org.apache.maven.plugin-tools:maven-plugin-annotations Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.10.2 to 3.11.0. - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.10.2...maven-plugin-tools-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fa8bebe930..d8ce57968e 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ 3.5.0 3.4.2 3.0.0 - 3.10.2 + 3.11.0 3.3.0 1.2 8059 From de312a01fbbfaf62f9549291706e6c72567d73c3 Mon Sep 17 00:00:00 2001 From: Christoph John Date: Thu, 11 Jan 2024 17:45:09 +0100 Subject: [PATCH 07/12] added goalPrefix --- quickfixj-codegenerator/pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickfixj-codegenerator/pom.xml b/quickfixj-codegenerator/pom.xml index ff2d806018..5cbee80d44 100644 --- a/quickfixj-codegenerator/pom.xml +++ b/quickfixj-codegenerator/pom.xml @@ -79,6 +79,9 @@ maven-plugin-plugin 3.11.0 + + quickfixj-codegenerator + From 7e66ea8ee11a1d9c5e60d8976895d4ed720b3db5 Mon Sep 17 00:00:00 2001 From: Marcin Date: Sat, 3 Feb 2024 15:06:35 +0100 Subject: [PATCH 08/12] Additional test scenario with acceptor running mixed sessions --- .../quickfix/mina/ssl/SSLCertificateTest.java | 146 +++++++++++++++--- 1 file changed, 121 insertions(+), 25 deletions(-) diff --git a/quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java b/quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java index 6d31b9293f..3a9d8a8d58 100644 --- a/quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java +++ b/quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java @@ -23,19 +23,21 @@ import org.apache.mina.core.filterchain.IoFilterChain; import org.apache.mina.core.session.IoSession; import org.apache.mina.filter.ssl.SslFilter; -import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import quickfix.Acceptor; import quickfix.ApplicationAdapter; import quickfix.ConfigError; import quickfix.DefaultMessageFactory; import quickfix.FixVersions; +import quickfix.Initiator; import quickfix.MemoryStoreFactory; import quickfix.MessageFactory; import quickfix.MessageStoreFactory; import quickfix.RuntimeError; import quickfix.Session; +import quickfix.SessionFactory; import quickfix.SessionID; import quickfix.SessionSettings; import quickfix.ThreadedSocketAcceptor; @@ -552,6 +554,51 @@ public void shouldFailWhenUsingBadServerCertificate() throws Exception { } } + @Test + public void shouldConnectDifferentTypesOfSessions() throws Exception { + int sslPort = AvailablePortFinder.getNextAvailable(); + int nonSslPort = AvailablePortFinder.getNextAvailable(); + TestAcceptor acceptor = new TestAcceptor(createMixedSessionAcceptorSettings(sslPort, nonSslPort, "single-session/server.keystore")); + + try { + acceptor.start(); + + TestInitiator sslInitiator = new TestInitiator( + createInitiatorSettings("single-session/client.keystore", "single-session/client.truststore", + CIPHER_SUITES_TLS, "TLSv1.2", "ZULU_SSL", "ALFA_SSL", Integer.toString(sslPort), "JKS", "JKS")); + + TestInitiator nonSslInitiator = new TestInitiator(createInitiatorSettings("ZULU_NON_SSL", "ALFA_NON_SSL", nonSslPort)); + + try { + sslInitiator.start(); + nonSslInitiator.start(); + + sslInitiator.assertNoSslExceptionThrown(); + sslInitiator.assertLoggedOn(new SessionID(FixVersions.BEGINSTRING_FIX44, "ZULU_SSL", "ALFA_SSL")); + sslInitiator.assertAuthenticated(new SessionID(FixVersions.BEGINSTRING_FIX44, "ZULU_SSL", "ALFA_SSL"), + new BigInteger("1448538842")); + + acceptor.assertNoSslExceptionThrown(); + acceptor.assertLoggedOn(new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_SSL", "ZULU_SSL")); + acceptor.assertNotAuthenticated(new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_SSL", "ZULU_SSL")); + + nonSslInitiator.assertNoSslExceptionThrown(); + nonSslInitiator.assertLoggedOn(new SessionID(FixVersions.BEGINSTRING_FIX44, "ZULU_NON_SSL", "ALFA_NON_SSL")); + nonSslInitiator.assertNotAuthenticated(new SessionID(FixVersions.BEGINSTRING_FIX44, "ZULU_NON_SSL", "ALFA_NON_SSL")); + + acceptor.assertNoSslExceptionThrown(); + acceptor.assertLoggedOn(new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_NON_SSL", "ZULU_NON_SSL")); + acceptor.assertNotAuthenticated(new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_NON_SSL", "ZULU_NON_SSL")); + + } finally { + sslInitiator.stop(); + nonSslInitiator.stop(); + } + } finally { + acceptor.stop(); + } + } + static abstract class TestConnector { private static final Logger LOGGER = LoggerFactory.getLogger(TestConnector.class); private static final int TIMEOUT_SECONDS = 5; @@ -744,24 +791,53 @@ public SessionConnector createConnector(SessionSettings sessionSettings) throws return new ThreadedSocketInitiator(new ApplicationAdapter(), messageStoreFactory, sessionSettings, messageFactory); } + } + /** + * Creates acceptor settings that contains two sessions. One with SSL support, one without. + */ + private SessionSettings createMixedSessionAcceptorSettings(int sslPort, int nonSslPort, String keyStoreName) { + HashMap defaults = new HashMap<>(); + defaults.put(SessionFactory.SETTING_CONNECTION_TYPE, "acceptor"); + defaults.put(Session.SETTING_START_TIME, "00:00:00"); + defaults.put(Session.SETTING_END_TIME, "00:00:00"); + defaults.put(Session.SETTING_HEARTBTINT, "30"); + + SessionSettings sessionSettings = new SessionSettings(); + sessionSettings.set(defaults); + + SessionID sslSession = new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_SSL", "ZULU_SSL"); + sessionSettings.setString(sslSession, "BeginString", FixVersions.BEGINSTRING_FIX44); + sessionSettings.setString(sslSession, "DataDictionary", "FIX44.xml"); + sessionSettings.setString(sslSession, "TargetCompID", "ZULU_SSL"); + sessionSettings.setString(sslSession, "SenderCompID", "ALFA_SSL"); + sessionSettings.setString(sslSession, SSLSupport.SETTING_USE_SSL, "Y"); + sessionSettings.setString(sslSession, SSLSupport.SETTING_KEY_STORE_NAME, keyStoreName); + sessionSettings.setString(sslSession, SSLSupport.SETTING_KEY_STORE_PWD, "password"); + sessionSettings.setString(sslSession, SSLSupport.SETTING_NEED_CLIENT_AUTH, "N"); + sessionSettings.setString(sslSession, "SocketAcceptPort", Integer.toString(sslPort)); + + SessionID nonSslSession = new SessionID(FixVersions.BEGINSTRING_FIX44, "ALFA_NON_SSL", "ZULU_NON_SSL"); + sessionSettings.setString(nonSslSession, "BeginString", FixVersions.BEGINSTRING_FIX44); + sessionSettings.setString(nonSslSession, "DataDictionary", "FIX44.xml"); + sessionSettings.setString(nonSslSession, "TargetCompID", "ZULU_NON_SSL"); + sessionSettings.setString(nonSslSession, "SenderCompID", "ALFA_NON_SSL"); + sessionSettings.setString(nonSslSession, "SocketAcceptPort", Integer.toString(nonSslPort)); + + return sessionSettings; } private SessionSettings createMultiSessionAcceptorSettings(String keyStoreName, boolean needClientAuth, String[] trustStoreNames, String cipherSuites, String protocols) { HashMap defaults = new HashMap<>(); - defaults.put("ConnectionType", "acceptor"); - defaults.put("SocketConnectProtocol", ProtocolFactory.getTypeString(ProtocolFactory.SOCKET)); + defaults.put(SessionFactory.SETTING_CONNECTION_TYPE, "acceptor"); defaults.put(SSLSupport.SETTING_USE_SSL, "Y"); defaults.put(SSLSupport.SETTING_KEY_STORE_NAME, keyStoreName); defaults.put(SSLSupport.SETTING_KEY_STORE_PWD, "password"); - defaults.put(SSLSupport.SETTING_NEED_CLIENT_AUTH, needClientAuth ? "Y" : "N"); - defaults.put("SocketAcceptHost", "localhost"); - defaults.put("StartTime", "00:00:00"); - defaults.put("EndTime", "00:00:00"); - defaults.put("HeartBtInt", "30"); - defaults.put("ReconnectInterval", "2"); + defaults.put(Session.SETTING_START_TIME, "00:00:00"); + defaults.put(Session.SETTING_END_TIME, "00:00:00"); + defaults.put(Session.SETTING_HEARTBTINT, "30"); if (cipherSuites != null) { defaults.put(SSLSupport.SETTING_CIPHER_SUITES, cipherSuites); @@ -791,8 +867,7 @@ private SessionSettings createMultiSessionAcceptorSettings(String keyStoreName, private SessionSettings createAcceptorSettings(String keyStoreName, boolean needClientAuth, String trustStoreName, String cipherSuites, String protocols, String keyStoreType, String trustStoreType, int port) { HashMap defaults = new HashMap<>(); - defaults.put("ConnectionType", "acceptor"); - defaults.put("SocketConnectProtocol", ProtocolFactory.getTypeString(ProtocolFactory.SOCKET)); + defaults.put(SessionFactory.SETTING_CONNECTION_TYPE, "acceptor"); defaults.put(SSLSupport.SETTING_USE_SSL, "Y"); defaults.put(SSLSupport.SETTING_KEY_STORE_NAME, keyStoreName); defaults.put(SSLSupport.SETTING_KEY_STORE_PWD, "password"); @@ -811,12 +886,10 @@ private SessionSettings createAcceptorSettings(String keyStoreName, boolean need } defaults.put(SSLSupport.SETTING_NEED_CLIENT_AUTH, needClientAuth ? "Y" : "N"); - defaults.put("SocketAcceptHost", "localhost"); - defaults.put("SocketAcceptPort", Integer.toString(port)); - defaults.put("StartTime", "00:00:00"); - defaults.put("EndTime", "00:00:00"); - defaults.put("HeartBtInt", "30"); - defaults.put("ReconnectInterval", "2"); + defaults.put(Acceptor.SETTING_SOCKET_ACCEPT_PORT, Integer.toString(port)); + defaults.put(Session.SETTING_START_TIME, "00:00:00"); + defaults.put(Session.SETTING_END_TIME, "00:00:00"); + defaults.put(Session.SETTING_HEARTBTINT, "30"); if (cipherSuites != null) { defaults.put(SSLSupport.SETTING_CIPHER_SUITES, cipherSuites); @@ -848,8 +921,8 @@ private SessionSettings createInitiatorSettings(String keyStoreName, String trus String protocols, String senderId, String targetId, String port, String keyStoreType, String trustStoreType, String endpointIdentificationAlgorithm) { HashMap defaults = new HashMap<>(); - defaults.put("ConnectionType", "initiator"); - defaults.put("SocketConnectProtocol", ProtocolFactory.getTypeString(ProtocolFactory.SOCKET)); + defaults.put(SessionFactory.SETTING_CONNECTION_TYPE, "initiator"); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, ProtocolFactory.getTypeString(ProtocolFactory.SOCKET)); defaults.put(SSLSupport.SETTING_USE_SSL, "Y"); defaults.put(SSLSupport.SETTING_KEY_STORE_NAME, keyStoreName); defaults.put(SSLSupport.SETTING_KEY_STORE_PWD, "password"); @@ -867,12 +940,12 @@ private SessionSettings createInitiatorSettings(String keyStoreName, String trus } } - defaults.put("SocketConnectHost", "localhost"); - defaults.put("SocketConnectPort", port); - defaults.put("StartTime", "00:00:00"); - defaults.put("EndTime", "00:00:00"); - defaults.put("HeartBtInt", "30"); - defaults.put("ReconnectInterval", "2"); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_HOST, "localhost"); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_PORT, port); + defaults.put(Initiator.SETTING_RECONNECT_INTERVAL, "2"); + defaults.put(Session.SETTING_START_TIME, "00:00:00"); + defaults.put(Session.SETTING_END_TIME, "00:00:00"); + defaults.put(Session.SETTING_HEARTBTINT, "30"); if (cipherSuites != null) { defaults.put(SSLSupport.SETTING_CIPHER_SUITES, cipherSuites); @@ -897,4 +970,27 @@ private SessionSettings createInitiatorSettings(String keyStoreName, String trus return sessionSettings; } + + private SessionSettings createInitiatorSettings(String senderId, String targetId, int port) { + HashMap defaults = new HashMap<>(); + defaults.put(SessionFactory.SETTING_CONNECTION_TYPE, "initiator"); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, ProtocolFactory.getTypeString(ProtocolFactory.SOCKET)); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_HOST, "localhost"); + defaults.put(Initiator.SETTING_SOCKET_CONNECT_PORT, Integer.toString(port)); + defaults.put(Initiator.SETTING_RECONNECT_INTERVAL, "2"); + defaults.put(Session.SETTING_START_TIME, "00:00:00"); + defaults.put(Session.SETTING_END_TIME, "00:00:00"); + defaults.put(Session.SETTING_HEARTBTINT, "30"); + + SessionID sessionID = new SessionID(FixVersions.BEGINSTRING_FIX44, senderId, targetId); + + SessionSettings sessionSettings = new SessionSettings(); + sessionSettings.set(defaults); + sessionSettings.setString(sessionID, "BeginString", FixVersions.BEGINSTRING_FIX44); + sessionSettings.setString(sessionID, "DataDictionary", "FIX44.xml"); + sessionSettings.setString(sessionID, "SenderCompID", senderId); + sessionSettings.setString(sessionID, "TargetCompID", targetId); + + return sessionSettings; + } } From 90730abed8e4888636b8b665b4fa81da645431fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 01:23:07 +0000 Subject: [PATCH 09/12] Bump al-cheb/configure-pagefile-action from 1.3 to 1.4 Bumps [al-cheb/configure-pagefile-action](https://github.com/al-cheb/configure-pagefile-action) from 1.3 to 1.4. - [Release notes](https://github.com/al-cheb/configure-pagefile-action/releases) - [Commits](https://github.com/al-cheb/configure-pagefile-action/compare/v1.3...v1.4) --- updated-dependencies: - dependency-name: al-cheb/configure-pagefile-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7fc23a3830..523cb26d38 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Configure pagefile - uses: al-cheb/configure-pagefile-action@v1.3 + uses: al-cheb/configure-pagefile-action@v1.4 with: minimum-size: 8GB maximum-size: 16GB From f82d4f1d54bba688b17678d63dafa67331c0746d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 01:30:22 +0000 Subject: [PATCH 10/12] Bump junit.jupiter.version from 5.10.1 to 5.10.2 Bumps `junit.jupiter.version` from 5.10.1 to 5.10.2. Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) Updates `org.junit.vintage:junit-vintage-engine` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.vintage:junit-vintage-engine dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a0c7fdf616..ef37158856 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ 2.0.11 4.11.0 2.2 - 5.10.1 + 5.10.2 8 8 From bc295dbaf2c0c730a8d31fb32ce1b3585407912e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 01:32:34 +0000 Subject: [PATCH 11/12] Bump slf4j.version from 2.0.11 to 2.0.12 Bumps `slf4j.version` from 2.0.11 to 2.0.12. Updates `org.slf4j:slf4j-jdk14` from 2.0.11 to 2.0.12 Updates `org.slf4j:slf4j-api` from 2.0.11 to 2.0.12 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-jdk14 dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef37158856..ad24fdd29f 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ UTF-8 UTF-8 1.8 - 2.0.11 + 2.0.12 4.11.0 2.2 5.10.2 From 7988f01f1988115e82ecd436397effc9b57a0cf7 Mon Sep 17 00:00:00 2001 From: Christoph John Date: Thu, 8 Feb 2024 11:35:21 +0100 Subject: [PATCH 12/12] Corrected failing ubuntu tests - java.lang.AbstractMethodError: org.hsqldb.jdbc.jdbcConnection.isValid(I)Z - moved definition of connection test query to common method for unit tests --- quickfixj-core/src/test/java/quickfix/JdbcLogTest.java | 1 - quickfixj-core/src/test/java/quickfix/JdbcTestSupport.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/quickfixj-core/src/test/java/quickfix/JdbcLogTest.java b/quickfixj-core/src/test/java/quickfix/JdbcLogTest.java index 189f9e1449..7436d7ca74 100644 --- a/quickfixj-core/src/test/java/quickfix/JdbcLogTest.java +++ b/quickfixj-core/src/test/java/quickfix/JdbcLogTest.java @@ -133,7 +133,6 @@ private void setUpJdbcLog(boolean filterHeartbeats, DataSource dataSource) throw if (filterHeartbeats) { settings.setBool(JdbcSetting.SETTING_JDBC_LOG_HEARTBEATS, false); } - settings.setString(sessionID, JdbcSetting.SETTING_JDBC_CONNECTION_TEST_QUERY, "SELECT COUNT(1) FROM INFORMATION_SCHEMA.SYSTEM_USERS WHERE 1 = 0;"); JdbcTestSupport.setHypersonicSettings(settings); initializeTableDefinitions(connection); logFactory = new JdbcLogFactory(settings); diff --git a/quickfixj-core/src/test/java/quickfix/JdbcTestSupport.java b/quickfixj-core/src/test/java/quickfix/JdbcTestSupport.java index a2f573f472..c29940bbb4 100644 --- a/quickfixj-core/src/test/java/quickfix/JdbcTestSupport.java +++ b/quickfixj-core/src/test/java/quickfix/JdbcTestSupport.java @@ -43,6 +43,8 @@ public static void setHypersonicSettings(SessionSettings settings) { settings.setString(JdbcSetting.SETTING_JDBC_CONNECTION_URL, HSQL_CONNECTION_URL); settings.setString(JdbcSetting.SETTING_JDBC_USER, HSQL_USER); settings.setString(JdbcSetting.SETTING_JDBC_PASSWORD, ""); + // HSQL doesn't support JDBC4 which means that test query has to be supplied to HikariCP + settings.setString(JdbcSetting.SETTING_JDBC_CONNECTION_TEST_QUERY, "SELECT COUNT(1) FROM INFORMATION_SCHEMA.SYSTEM_USERS WHERE 1 = 0;"); } public static Connection getConnection() throws ClassNotFoundException, SQLException {