Skip to content

Commit

Permalink
Release XLT 7.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jowerner committed Nov 27, 2023
2 parents 7cde978 + 72ba4b5 commit f0d390b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.xceptance</groupId>
<artifactId>xlt</artifactId>
<version>7.3.0</version>
<version>7.3.1</version>
<packaging>jar</packaging>

<name>XLT</name>
Expand Down Expand Up @@ -462,6 +462,18 @@
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
<version>0.9.2</version>
<exclusions>
<!-- jline is overridden below -->
<exclusion>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>3.23.0</version>
</dependency>

<!-- ================= -->
Expand Down
4 changes: 3 additions & 1 deletion resultbrowser/src/js/json-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
*/
class InstrumentedSocketImplFactory implements SocketImplFactory
{
/**
* Constructor.
*/
public InstrumentedSocketImplFactory()
{
// try to initialize and throw if initialization fails
InstrumentedSocketImpl.initialize();
}

/**
* {@inheritDoc}
*/
Expand Down
20 changes: 17 additions & 3 deletions src/main/java/com/xceptance/xlt/engine/socket/XltSockets.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand All @@ -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));
}
}
}
}
Expand Down

0 comments on commit f0d390b

Please sign in to comment.