Skip to content

Commit 61cc04b

Browse files
Replaced IOUtils.closeQuietly() by client.close()
1 parent 345cf47 commit 61cc04b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/io/github/delirius325/jmeter/backendlistener/elasticsearch/ElasticsearchBackend.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ public void handleSampleResults(List<SampleResult> results, BackendListenerConte
130130
}
131131
}
132132

133+
System.out.println("-----------------------------");
134+
System.out.println("iteration: " + JMeterContextService.getContext().getVariables().getIteration());
135+
136+
JMeterContextService.getClientSideVariables().entrySet().forEach(variable -> {
137+
System.out.println(variable.getKey() + " : " + variable.getValue());
138+
});
139+
133140
if(validSample)
134141
this.bulkRequestList.add(new Gson().toJson(this.getElasticData(sr, context)));
135142
}
@@ -150,7 +157,7 @@ public void teardownTest(BackendListenerContext context) throws Exception {
150157
if(this.bulkRequestList.size() > 0) {
151158
sendRequest(this.bulkRequestList);
152159
}
153-
IOUtils.closeQuietly(client);
160+
client.close();
154161
super.teardownTest(context);
155162
}
156163

0 commit comments

Comments
 (0)