Skip to content

Commit

Permalink
Release XLT 5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jowerner committed Sep 6, 2021
2 parents 29ea2d7 + 26b087b commit c1967ef
Show file tree
Hide file tree
Showing 32 changed files with 1,540 additions and 1,243 deletions.
3 changes: 3 additions & 0 deletions config/ec2_admin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
#aws.secretKey = <enter your secret key>

## The AWS key pair names (as listed in AWS console / EC2 / KeyPairs)
#aws.keypair.af-south-1 =
#aws.keypair.ap-east-1 =
#aws.keypair.ap-northeast-1 =
#aws.keypair.ap-northeast-2 =
#aws.keypair.ap-northeast-3 =
#aws.keypair.ap-south-1 =
#aws.keypair.ap-southeast-1 =
#aws.keypair.ap-southeast-2 =
#aws.keypair.ca-central-1 =
#aws.keypair.eu-central-1 =
#aws.keypair.eu-north-1 =
#aws.keypair.eu-south-1 =
#aws.keypair.eu-west-1 =
#aws.keypair.eu-west-2 =
#aws.keypair.eu-west-3 =
Expand Down
24 changes: 7 additions & 17 deletions 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>5.6.0</version>
<version>5.7.0</version>
<packaging>jar</packaging>

<name>XLT</name>
Expand Down Expand Up @@ -266,16 +266,6 @@
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-http-client-transport</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-conscrypt-client</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
Expand All @@ -302,6 +292,11 @@
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.14.9</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
Expand Down Expand Up @@ -331,7 +326,7 @@
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.17</version>
<version>1.4.18</version>
</dependency>
<!-- ASM Libraries (required for Parboiled, PMD and Cobertura) -->
<dependency>
Expand Down Expand Up @@ -384,11 +379,6 @@
<artifactId>jaxb-impl</artifactId>
<version>2.3.2</version>
</dependency>

<!--
https://github.com/ctongfei/progressbar
MIT license
-->
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public String getVirtualHost() {
/**
* Converts an HttpMethod into a WebResponse.
*/
private WebResponse makeWebResponse(final HttpResponse httpResponse,
protected WebResponse makeWebResponse(final HttpResponse httpResponse,
final WebRequest webRequest, final DownloadedContent responseBody, final long loadTime) {

String statusMessage = httpResponse.getStatusLine().getReasonPhrase();
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,30 @@ public void setRawSize(final int size)
rawSize = size;
}
// HA end (XLT#1233)

// XC start
private String protocolVersion;

/**
* Returns the protocol version of this response, for example "HTTP/1.1".
* @return the protocol version
* @deprecated For internal use only.
*/
@Deprecated
public String getProtocolVersion()
{
return protocolVersion;
}

/**
* Sets the protocol version of this response, for example "HTTP/1.1".
* @param protocolVersion the protocol version
* @deprecated For internal use only.
*/
@Deprecated
public void setProtocolVersion(final String protocolVersion)
{
this.protocolVersion = protocolVersion;
}
// XC end
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,33 @@ public class AgentManagerImpl implements AgentManager, AgentListener
/**
* A file filter that ignores result browser directories (directories named "output").
*/
private static final IOFileFilter NO_RESULTBROWSER_FILTER = FileFilterUtils.notFileFilter(FileFilterUtils.makeDirectoryOnly(new NameFileFilter(
"output")));
private static final IOFileFilter NO_RESULTBROWSER_FILTER = FileFilterUtils.notFileFilter(FileFilterUtils.makeDirectoryOnly(new NameFileFilter("output")));

/**
* A file filter that ignores agent log files.
*/
private static final IOFileFilter NO_AGENTLOG_FILTER = FileFilterUtils.notFileFilter(FileFilterUtils.makeFileOnly(new WildcardFileFilter(
"agent*.log*")));
private static final IOFileFilter NO_AGENTLOG_FILTER = FileFilterUtils.notFileFilter(FileFilterUtils.makeFileOnly(new WildcardFileFilter("agent*.log*")));

/**
* A file filter that ignores timer files.
*/
private static final IOFileFilter NO_TIMERS_FILTER = FileFilterUtils.notFileFilter(FileFilterUtils.makeFileOnly(new WildcardFileFilter("timers.csv*")));

/**
* A file filter that ignores both agent log files and result browser directories.
*/
private static final IOFileFilter NO_AGENTLOG_NO_RESULTBROWSER_FILTER = FileFilterUtils.and(NO_RESULTBROWSER_FILTER, NO_AGENTLOG_FILTER);
private static final IOFileFilter NO_AGENTLOG_NO_RESULTBROWSER_FILTER = FileFilterUtils.and(NO_RESULTBROWSER_FILTER,
NO_AGENTLOG_FILTER);

/**
* A file filter that ignores both agent log files and timer files.
*/
private static final IOFileFilter NO_AGENTLOG_NO_TIMERS_FILTER = FileFilterUtils.and(NO_AGENTLOG_FILTER, NO_TIMERS_FILTER);

/**
* A file filter that ignores both result browser directories and timer files.
*/
private static final IOFileFilter NO_RESULTBROWSER_NO_TIMERS_FILTER = FileFilterUtils.and(NO_RESULTBROWSER_FILTER, NO_TIMERS_FILTER);

/**
* agent
Expand Down Expand Up @@ -186,6 +200,18 @@ public static boolean archiveAgentResults(final File directory, final TestResult
case MEASUREMENTS_ONLY:
fileFilter = NO_AGENTLOG_NO_RESULTBROWSER_FILTER;
break;
case MEASUREMENTS_AND_LOGS:
fileFilter = NO_RESULTBROWSER_FILTER;
break;
case RESULTBROWSER_AND_LOGS:
fileFilter = NO_TIMERS_FILTER;
break;
case RESULTBROWSER_ONLY:
fileFilter = NO_AGENTLOG_NO_TIMERS_FILTER;
break;
case LOGS_ONLY:
fileFilter = NO_RESULTBROWSER_NO_TIMERS_FILTER;
break;
default:
fileFilter = null;
break;
Expand Down Expand Up @@ -341,10 +367,8 @@ public void updateAgentFiles(final File sourceDir)
{
// get file indexes
final FileReplicationIndex srcIndex = FileReplicationUtils.getIndex(sourceDir, FileFilterUtils.makeSVNAware(null));
final FileReplicationIndex dstIndex = getAgentInfo().getAgentDirectory().exists()
? FileReplicationUtils.getIndex(getAgentInfo().getAgentDirectory(),
FileFilterUtils.makeSVNAware(null))
: new FileReplicationIndex();
final FileReplicationIndex dstIndex = getAgentInfo().getAgentDirectory()
.exists() ? FileReplicationUtils.getIndex(getAgentInfo().getAgentDirectory(), FileFilterUtils.makeSVNAware(null)) : new FileReplicationIndex();

// get the files to be updated or deleted on the target
final List<File> filesToBeDeleted = new ArrayList<File>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ public enum TestResultAmount
{
ALL("Measurements, result browser data, and logs [all]", "1"),
MEASUREMENTS_AND_RESULTBROWSER("Measurements and result browser data", "2"),
MEASUREMENTS_ONLY("Measurements only", "3"),
MEASUREMENTS_AND_LOGS("Measurements and logs", "3"),
MEASUREMENTS_ONLY("Measurements only", "4"),
RESULTBROWSER_AND_LOGS("Result browser data and logs", "5"),
RESULTBROWSER_ONLY("Result browser only", "6"),
LOGS_ONLY("Logs only", "7"),
CANCEL("Cancel", "c");

private static final String[] displayNames;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/xceptance/xlt/ec2/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class Main extends AbstractEC2Client
FRIENDLY_REGION_NAMES.put("ap-east-1", "Asia Pacific - Hong Kong ");
FRIENDLY_REGION_NAMES.put("ap-northeast-1", "Asia Pacific - Tokyo ");
FRIENDLY_REGION_NAMES.put("ap-northeast-2", "Asia Pacific - Seoul ");
FRIENDLY_REGION_NAMES.put("ap-northeast-3", "Asia Pacific - Osaka ");
FRIENDLY_REGION_NAMES.put("ap-south-1", "Asia Pacific - Mumbai ");
FRIENDLY_REGION_NAMES.put("ap-southeast-1", "Asia Pacific - Singapore ");
FRIENDLY_REGION_NAMES.put("ap-southeast-2", "Asia Pacific - Sydney ");
Expand Down
34 changes: 20 additions & 14 deletions src/main/java/com/xceptance/xlt/engine/XltWebClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
import com.xceptance.xlt.api.util.XltLogger;
import com.xceptance.xlt.api.util.XltProperties;
import com.xceptance.xlt.engine.htmlunit.apache.XltApacheHttpWebConnection;
import com.xceptance.xlt.engine.htmlunit.jetty.JettyHttpWebConnection;
import com.xceptance.xlt.engine.htmlunit.okhttp3.OkHttp3WebConnection;
import com.xceptance.xlt.engine.socket.XltSockets;
import com.xceptance.xlt.engine.util.CssUtils;
import com.xceptance.xlt.engine.util.JSBeautifingResponseProcessor;
Expand Down Expand Up @@ -422,17 +422,23 @@ public XltWebClient(final BrowserVersion browserVersion)
// we are in offline mode and return fixed responses
underlyingWebConnection = new XltOfflineWebConnection();
}
else if (props.getProperty("com.xceptance.xlt.http.http2.enabled", false))
{
// use our experimental HTTP/2 web connection
underlyingWebConnection = new JettyHttpWebConnection(this, true);
}
else
{
// we are online and use the normal connection
underlyingWebConnection = new XltApacheHttpWebConnection(this);
final String client = props.getProperty("com.xceptance.xlt.http.client");
if ("okhttp3".equals(client))
{
final boolean http2Enabled = props.getProperty("com.xceptance.xlt.http.client.okhttp3.http2Enabled", true);
underlyingWebConnection = new OkHttp3WebConnection(this, http2Enabled);
}
else
{
// the default connection
underlyingWebConnection = new XltApacheHttpWebConnection(this);
}
}

XltLogger.runTimeLogger.debug("Using web connection class: " + underlyingWebConnection.getClass().getName());

final XltHttpWebConnection connection = new XltHttpWebConnection(this, underlyingWebConnection);
setWebConnection(connection);
}
Expand Down Expand Up @@ -675,8 +681,8 @@ public void loadNewStaticContent(final HtmlPage htmlPage)
final String mediaAttribute = e.getAttribute("media");
final String hrefAttribute = e.getAttribute("href");

if (StringUtils.isNotEmpty(hrefAttribute) && RegExUtils.isMatching(relAttribute, LINKTYPE_WHITELIST_PATTERN) &&
(StringUtils.isBlank(mediaAttribute) || RegExUtils.isMatching(mediaAttribute, LINK_MEDIA_WHITELIST_PATTERN)))
if (StringUtils.isNotEmpty(hrefAttribute) && RegExUtils.isMatching(relAttribute, LINKTYPE_WHITELIST_PATTERN)
&& (StringUtils.isBlank(mediaAttribute) || RegExUtils.isMatching(mediaAttribute, LINK_MEDIA_WHITELIST_PATTERN)))
{
urlStrings.add(hrefAttribute);
}
Expand Down Expand Up @@ -809,8 +815,8 @@ private void loadStaticContent(String page, final URL baseURL, final Charset cha
// check type and media attributes if present
final String typeAtt = LWPageUtilities.getAttributeValue(styleAtts, "type");
final String mediaAtt = LWPageUtilities.getAttributeValue(styleAtts, "media");
if ("text/css".equalsIgnoreCase(typeAtt) &&
(StringUtils.isBlank(mediaAtt) || RegExUtils.isMatching(mediaAtt, LINK_MEDIA_WHITELIST_PATTERN)))
if ("text/css".equalsIgnoreCase(typeAtt)
&& (StringUtils.isBlank(mediaAtt) || RegExUtils.isMatching(mediaAtt, LINK_MEDIA_WHITELIST_PATTERN)))
{
sb.append(m.group(2));
}
Expand Down Expand Up @@ -1588,8 +1594,8 @@ private void addCssStyleRulesWithUrls(final CSSStyleSheet sheet, final List<CSSS
{
if (XltLogger.runTimeLogger.isDebugEnabled())
{
XltLogger.runTimeLogger.debug("Failed to process CSS style sheet: " + sheet.getUri() + ". Cause: " +
t.getMessage());
XltLogger.runTimeLogger.debug("Failed to process CSS style sheet: " + sheet.getUri() + ". Cause: "
+ t.getMessage());
}
}
}
Expand Down
Loading

0 comments on commit c1967ef

Please sign in to comment.