Skip to content

Commit

Permalink
Merge pull request #85 from delirius325/feature/fix-#82
Browse files Browse the repository at this point in the history
Version 2.6.11
  • Loading branch information
anthonygauthier authored May 29, 2020
2 parents 0aa6b59 + 2b81de2 commit fecff50
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
21 changes: 13 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.delirius325</groupId>
<artifactId>jmeter.backendlistener.elasticsearch</artifactId>
<version>2.6.10-SNAPSHOT</version>
<version>2.6.11</version>
<packaging>jar</packaging>

<name>jmeter.backendlistener.elasticsearch</name>
Expand Down Expand Up @@ -37,13 +37,18 @@
<url>http://www.github.com/delirius325</url>
<timezone>America/New_York</timezone>
</developer>
<developer>
<id>siggitrain</id>
</developers>

<contributors>
<contributor>
<name>Christian Weber</name>
<url>http://www.github.com/siggitrain</url>
<timezone>MESZ</timezone>
</developer>
</developers>
<properties>
<github>siggitrain</github>
</properties>
</contributor>
</contributors>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -55,9 +60,9 @@
<junit.vintage.version>${junit.version}.0</junit.vintage.version>
<junit.jupiter.version>5.0.0</junit.jupiter.version>
<junit.platform.version>1.0.0</junit.platform.version>
<org.apache.jmeter.version>5.0</org.apache.jmeter.version>
<org.apache.commons>3.7</org.apache.commons>
<org.elasticsearch.client>6.4.0</org.elasticsearch.client>
<org.apache.jmeter.version>5.3</org.apache.jmeter.version>
<org.apache.commons>3.9</org.apache.commons>
<org.elasticsearch.client>6.7.1</org.elasticsearch.client>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.commons.lang.math.NumberUtils.isNumber;
import static org.apache.commons.lang3.math.NumberUtils.isCreatable;

public class ElasticSearchMetric {
private static final Logger logger = LoggerFactory.getLogger(ElasticSearchMetric.class);
Expand Down Expand Up @@ -164,7 +164,7 @@ private void addCustomFields(BackendListenerContext context) {

if (!parameterName.startsWith("es.") && context.containsParameter(parameterName)
&& !"".equals(parameter = context.getParameter(parameterName).trim())) {
if (isNumber(parameter)) {
if (isCreatable(parameter)) {
addFilteredJSON(parameterName, Long.parseLong(parameter));
} else {
addFilteredJSON(parameterName, parameter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.apache.commons.io.FilenameUtils;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequestInterceptor;
import org.apache.jmeter.JMeter;
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.util.JMeterUtils;
Expand Down Expand Up @@ -100,7 +101,7 @@ public void setupTest(BackendListenerContext context) throws Exception {
this.fields = new HashSet<>();
this.modes = new HashSet<>(Arrays.asList("info", "debug", "error", "quiet"));
this.bulkSize = Integer.parseInt(context.getParameter(ES_BULK_SIZE));
this.timeoutMs = JMeterUtils.getPropDefault(ES_TIMEOUT_MS, DEFAULT_TIMEOUT_MS);
this.timeoutMs = Integer.parseInt((context.getParameter(ES_TIMEOUT_MS)));
this.buildNumber = (JMeterUtils.getProperty(ElasticsearchBackendClient.BUILD_NUMBER) != null
&& !JMeterUtils.getProperty(ElasticsearchBackendClient.BUILD_NUMBER).trim().equals(""))
? Integer.parseInt(JMeterUtils.getProperty(ElasticsearchBackendClient.BUILD_NUMBER)) : 0;
Expand All @@ -118,7 +119,7 @@ public void setupTest(BackendListenerContext context) throws Exception {
public void onFailure(Node node) {
logger.error("Error with node: " + node.toString());
}
}).setMaxRetryTimeoutMillis(60000).build();
}).build();
} else {
AWS4Signer signer = new AWS4Signer();
signer.setServiceName(SERVICE_NAME);
Expand Down

0 comments on commit fecff50

Please sign in to comment.