From ee40e24b4adc89043ba0f1cccaa600d6375c980a Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 30 Jul 2021 16:18:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AAENV,=20topic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/config/KafkaProperties.java | 7 +++++++ .../performance/engine/docker/DockerTestEngine.java | 1 + 2 files changed, 8 insertions(+) diff --git a/backend/src/main/java/io/metersphere/config/KafkaProperties.java b/backend/src/main/java/io/metersphere/config/KafkaProperties.java index 9406320c54..9b990468df 100644 --- a/backend/src/main/java/io/metersphere/config/KafkaProperties.java +++ b/backend/src/main/java/io/metersphere/config/KafkaProperties.java @@ -27,6 +27,7 @@ public class KafkaProperties { private String queueSize = "20000"; // backend listener queue size private KafkaProperties.Ssl ssl = new KafkaProperties.Ssl(); private KafkaProperties.Log log = new KafkaProperties.Log(); + private KafkaProperties.Report report = new KafkaProperties.Report(); @Getter @Setter @@ -49,4 +50,10 @@ public class KafkaProperties { public static class Log { private String topic; } + + @Getter + @Setter + public static class Report { + private String topic; + } } diff --git a/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java index 9ac6c02b5b..bb7d4219b3 100644 --- a/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java @@ -90,6 +90,7 @@ public class DockerTestEngine extends AbstractEngine { env.put("REPORT_ID", this.getReportId()); env.put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers()); env.put("LOG_TOPIC", kafkaProperties.getLog().getTopic()); + env.put("JMETER_REPORTS_TOPIC", kafkaProperties.getReport().getTopic()); env.put("RESOURCE_ID", resource.getId()); env.put("THREAD_NUM", "0");// 传入0表示不用修改线程数 env.put("HEAP", HEAP);