fix(性能测试): 修复文件可能为空的问题

This commit is contained in:
Captain.B 2021-07-13 12:19:55 +08:00 committed by 刘瑞斌
parent 8ce0b405d0
commit 3ec4d92e94
1 changed files with 3 additions and 0 deletions

View File

@ -286,6 +286,9 @@ public class JmeterDocumentParser implements DocumentParser {
int resourceIndex = context.getResourceIndex();
String filename = item.getTextContent();
byte[] content = context.getTestResourceFiles().get(filename);
if (content == null) {
return;
}
StringTokenizer tokenizer = new StringTokenizer(new String(content), "\n");
if (!tokenizer.hasMoreTokens()) {
return;