refactor(性能测试): 性能测试下载zip使用流下载

This commit is contained in:
CaptainB 2024-01-11 15:09:48 +08:00
parent 68dcdc7414
commit b0e8bd3a81
1 changed files with 5 additions and 5 deletions

View File

@ -386,11 +386,6 @@ public class JmeterDocumentParser implements EngineSourceParser {
if (content == null) { if (content == null) {
return; return;
} }
StringTokenizer tokenizer = new StringTokenizer(IOUtils.toString(content, StandardCharsets.UTF_8), StringUtils.LF);
if (!tokenizer.hasMoreTokens()) {
return;
}
StringBuilder csv = new StringBuilder();
Object config = ((Map) csvConfig).get(filename); Object config = ((Map) csvConfig).get(filename);
if (config == null) { if (config == null) {
return; return;
@ -399,6 +394,11 @@ public class JmeterDocumentParser implements EngineSourceParser {
if (!BooleanUtils.toBoolean(csvSplit)) { if (!BooleanUtils.toBoolean(csvSplit)) {
return; return;
} }
StringTokenizer tokenizer = new StringTokenizer(IOUtils.toString(content, StandardCharsets.UTF_8), StringUtils.LF);
if (!tokenizer.hasMoreTokens()) {
return;
}
StringBuilder csv = new StringBuilder();
Boolean csvHasHeader = (Boolean) ((Map) (config)).get("csvHasHeader"); Boolean csvHasHeader = (Boolean) ((Map) (config)).get("csvHasHeader");
if (BooleanUtils.toBoolean(csvHasHeader)) { if (BooleanUtils.toBoolean(csvHasHeader)) {
String header = tokenizer.nextToken(); String header = tokenizer.nextToken();