refactor(接口测试): 按照线程组隔离文件读取逻辑
Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
f96c359571
commit
4f9f9ee2d1
|
@ -575,8 +575,15 @@ public class FileServer {
|
|||
* @return {@link File} instance
|
||||
*/
|
||||
public File getResolvedFile(String path) {
|
||||
log.info("getResolvedFile: {}", path);
|
||||
String threadName = JMeterContextService.getContext().getThread().getThreadName();
|
||||
if (!StringUtils.contains(path, threadName)) {
|
||||
path = StringUtils.join(threadName, path);
|
||||
}
|
||||
reserveFile(path);
|
||||
return files.get(path).file;
|
||||
|
||||
FileEntry fileEntry = files.get(path);
|
||||
return fileEntry != null ? fileEntry.file : null;
|
||||
}
|
||||
|
||||
private static class FileEntry {
|
||||
|
|
Loading…
Reference in New Issue