You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2023/04/29 16:06:59 UTC
[jmeter] 02/03: include threadName tag in InfluxDBRawBackendListener tests
This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit 121944d73ac64de10754809544a219eb6e2f6128
Author: Victor Peralta <vi...@gmail.com>
AuthorDate: Mon Mar 6 00:52:21 2023 +0100
include threadName tag in InfluxDBRawBackendListener tests
---
.../backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy b/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
index 4a2a893777..5390a2507b 100644
--- a/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
+++ b/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
@@ -33,6 +33,7 @@ class InfluxDBRawBackendListenerClientSpec extends Specification {
okSample.setLatency(42)
okSample.setConnectTime(7)
okSample.setSampleLabel("myLabel")
+ okSample.setThreadName("myThread")
okSample.setResponseOK()
return okSample
}
@@ -62,7 +63,7 @@ class InfluxDBRawBackendListenerClientSpec extends Specification {
def tags = sut.createTags(okSample)
def fields = sut.createFields(okSample)
then:
- tags == "status=ok,transaction=myLabel"
+ tags == "status=ok,transaction=myLabel,threadName=myThread"
fields == "duration=100,ttfb=42,connectTime=7"
}
@@ -70,8 +71,9 @@ class InfluxDBRawBackendListenerClientSpec extends Specification {
given:
def koSample = new SampleResult()
koSample.setSampleLabel("myLabel")
+ koSample.setThreadName("myThread")
expect:
- sut.createTags(koSample) == "status=ko,transaction=myLabel"
+ sut.createTags(koSample) == "status=ko,transaction=myLabel,threadName=myThread"
}
def "Upon handling sample result data is added to influxDBMetricsManager and written"() {