From 9888e4acbc65a8c587108d70d738d50f023109e6 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 17 Mar 2020 17:55:14 +0800 Subject: [PATCH] test.name --- .../parse/xml/reader/jmx/JmeterDocumentParser.java | 3 ++- backend/src/test/java/io/metersphere/JmxFileParseTest.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java index 90b63e0631..32eeac7314 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -136,8 +136,9 @@ public class JmeterDocumentParser implements DocumentParser { collectionProp.appendChild(createKafkaProp(document, "kafka.batch.size", kafkaProperties.getBatchSize())); collectionProp.appendChild(createKafkaProp(document, "kafka.client.id", kafkaProperties.getClientId())); collectionProp.appendChild(createKafkaProp(document, "kafka.connections.max.idle.ms", kafkaProperties.getConnectionsMaxIdleMs())); - // 添加关联关系 test.id + // 添加关联关系 test.id test.name collectionProp.appendChild(createKafkaProp(document, "test.id", context.getTestId())); + collectionProp.appendChild(createKafkaProp(document, "test.name", context.getTestName())); elementProp.appendChild(collectionProp); // set elementProp diff --git a/backend/src/test/java/io/metersphere/JmxFileParseTest.java b/backend/src/test/java/io/metersphere/JmxFileParseTest.java index 73c4bcae7a..cc3c7813f6 100644 --- a/backend/src/test/java/io/metersphere/JmxFileParseTest.java +++ b/backend/src/test/java/io/metersphere/JmxFileParseTest.java @@ -152,8 +152,9 @@ public class JmxFileParseTest { collectionProp.appendChild(createKafkaProp(document, "kafka.batch.size", kafkaProperties.getBatchSize())); collectionProp.appendChild(createKafkaProp(document, "kafka.client.id", kafkaProperties.getClientId())); collectionProp.appendChild(createKafkaProp(document, "kafka.connections.max.idle.ms", kafkaProperties.getConnectionsMaxIdleMs())); - // 添加关联关系 test.id - collectionProp.appendChild(createKafkaProp(document, "test.id", "test_id")); + // 添加关联关系 test.id test.name + collectionProp.appendChild(createKafkaProp(document, "test.id", "")); + collectionProp.appendChild(createKafkaProp(document, "test.name", "")); elementProp.appendChild(collectionProp); // set elementProp