fix(性能测试): 修复性能测试jmx中脚本空格被过滤掉的问题

--bug=1010634 --user=刘瑞斌 【性能测试】场景转性能测试后,脚本里少了个空格 https://www.tapd.cn/55049933/s/1110317
This commit is contained in:
CaptainB 2022-02-25 15:13:35 +08:00 committed by 刘瑞斌
parent 1e3e6a83de
commit 44aade3901
1 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,11 @@ public class EngineSourceParserFactory {
) { ) {
// 删除空白的行 // 删除空白的行
List<Node> nodes = document.selectNodes("//text()[normalize-space(.)='']"); List<Node> nodes = document.selectNodes("//text()[normalize-space(.)='']");
nodes.forEach(node -> node.setText("")); nodes.forEach(node -> {
if (node.getText().contains("\n")) {
node.setText("");
}
});
XMLWriter xw = new XMLWriter(out, format); XMLWriter xw = new XMLWriter(out, format);
xw.setEscapeText(IS_TRANS); xw.setEscapeText(IS_TRANS);