From d5320486aa89ba30d968fd76f69c25ceb1520131 Mon Sep 17 00:00:00 2001 From: Joerg Werner <4639399+jowerner@users.noreply.github.com> Date: Tue, 24 Oct 2023 16:22:59 +0200 Subject: [PATCH 1/5] incremented version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a27dc6fab..8951691dc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.xceptance xlt - 7.3.0 + 7.3.1-SNAPSHOT jar XLT From d41e25e36ef2367ad7dd0da9ceb7d17b993495d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Werner?= <4639399+jowerner@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:46:51 +0100 Subject: [PATCH 2/5] Attach event handlers only if there is a valid JSON tree. (#437) --- resultbrowser/src/js/json-tree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resultbrowser/src/js/json-tree.js b/resultbrowser/src/js/json-tree.js index efb7735b4..c4376cde8 100644 --- a/resultbrowser/src/js/json-tree.js +++ b/resultbrowser/src/js/json-tree.js @@ -437,7 +437,9 @@ * @param {(string) => void} handler - consumes the JSON path of the target node */ onJsonNodeSelected(handler) { - attachEventHandlers(this.tree, (node) => handler(node.getJsonPath())); + if (this.tree) { + attachEventHandlers(this.tree, (node) => handler(node.getJsonPath())); + } } } From 41a8323930f334b674f6ccfdc775ad1fa3a3e175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Werner?= <4639399+jowerner@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:08:03 +0100 Subject: [PATCH 3/5] #179: Support for JDK 17+ (#435) * XLT does no longer throw if the socket layer cannot be instrumented with the used JVM, but logs a warning only. * If the socket layer cannot be instrumented with the used JVM, log a warning in dev mode, but throw an exception in load test mode. --- .../engine/socket/InstrumentedSocketImpl.java | 9 +++++++++ .../socket/InstrumentedSocketImplFactory.java | 9 +++++++++ .../xlt/engine/socket/XltSockets.java | 20 ++++++++++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImpl.java b/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImpl.java index 5b8d5f4c8..b5660a4ff 100644 --- a/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImpl.java +++ b/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImpl.java @@ -181,6 +181,15 @@ class InstrumentedSocketImpl extends SocketImpl } } + /** + * Initializes this class for instrumentation. + */ + public static void initialize() + { + // Calling this method the first time implicitly triggers the static initializer block above to be executed + // once. Apart from that, there is nothing more to do here. + } + /** * The actual socket implementation. */ diff --git a/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImplFactory.java b/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImplFactory.java index 8396aec6a..729b95ca7 100644 --- a/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImplFactory.java +++ b/src/main/java/com/xceptance/xlt/engine/socket/InstrumentedSocketImplFactory.java @@ -24,6 +24,15 @@ */ class InstrumentedSocketImplFactory implements SocketImplFactory { + /** + * Constructor. + */ + public InstrumentedSocketImplFactory() + { + // try to initialize and throw if initialization fails + InstrumentedSocketImpl.initialize(); + } + /** * {@inheritDoc} */ diff --git a/src/main/java/com/xceptance/xlt/engine/socket/XltSockets.java b/src/main/java/com/xceptance/xlt/engine/socket/XltSockets.java index c16c4aac6..1f1cfd23e 100644 --- a/src/main/java/com/xceptance/xlt/engine/socket/XltSockets.java +++ b/src/main/java/com/xceptance/xlt/engine/socket/XltSockets.java @@ -15,10 +15,15 @@ */ package com.xceptance.xlt.engine.socket; -import java.io.IOException; import java.net.Socket; import java.net.SocketImplFactory; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.xceptance.xlt.api.engine.Session; +import com.xceptance.xlt.api.util.XltException; import com.xceptance.xlt.api.util.XltProperties; import com.xceptance.xlt.common.XltConstants; @@ -35,6 +40,8 @@ */ public final class XltSockets { + private static final Logger LOG = LoggerFactory.getLogger(XltSockets.class); + private static final String PROP_COLLECT_NETWORK_DATA = XltConstants.XLT_PACKAGE_PATH + ".socket.collectNetworkData"; static @@ -46,9 +53,16 @@ public final class XltSockets // set the global socket impl factory Socket.setSocketImplFactory(new InstrumentedSocketImplFactory()); } - catch (final IOException ex) + catch (final Throwable ex) { - throw new RuntimeException("Failed to initialize XLT sockets", ex); + if (Session.getCurrent().isLoadTest()) + { + throw new XltException("Failed to initialize XLT sockets", ex); + } + else + { + LOG.warn("Failed to initialize XLT sockets: {}", ExceptionUtils.getRootCauseMessage(ex)); + } } } } From e23c23261114b2ee7b89488d6417fb0dc5c77370 Mon Sep 17 00:00:00 2001 From: Joerg Werner <4639399+jowerner@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:40:37 +0100 Subject: [PATCH 4/5] #443: Create report crashes on newer Macs - use a version of jline that is newer than the one coming with progressbar --- pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pom.xml b/pom.xml index 8951691dc..d9d4f42dd 100644 --- a/pom.xml +++ b/pom.xml @@ -462,6 +462,18 @@ me.tongfei progressbar 0.9.2 + + + + org.jline + jline + + + + + org.jline + jline + 3.23.0 From 72ba4b5738ef2d96eee2851ca36ea70df41c8157 Mon Sep 17 00:00:00 2001 From: Joerg Werner <4639399+jowerner@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:42:05 +0100 Subject: [PATCH 5/5] prepare release XLT 7.3.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9d4f42dd..049a0f1ba 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.xceptance xlt - 7.3.1-SNAPSHOT + 7.3.1 jar XLT