From f43a61f996200e1d8974f2a6ef4c1ef08d658f6b Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 23 Jan 2024 13:41:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E4=B8=8B=E8=BD=BDzip?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=B5=81=E4=B8=8B=E8=BD=BD,=E5=85=BC?= =?UTF-8?q?=E5=AE=B91.20=E5=8D=87=E7=BA=A7=E4=B8=8A=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/engine/EngineFactory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java index d543a3529f..5c0cafe153 100644 --- a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java @@ -192,6 +192,10 @@ public class EngineFactory { if (CollectionUtils.isNotEmpty(resourceFiles)) { resourceFiles.forEach(cf -> { InputStream in = fileMetadataService.getFileAsStream(cf.getId()); + if (in == null) { + byte[] bytes = fileMetadataService.loadFileAsBytes(cf.getId()); + in = new ByteArrayInputStream(bytes); + } testResourceFiles.put(cf.getName(), in); }); }