From 98e9599da0c7d8f88c8f8adb207a8a287a62256c Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Tue, 28 Sep 2021 19:47:04 +1000 Subject: [PATCH] Don't fail testing if transformation fails --- .../io/quarkus/deployment/dev/testing/JunitTestRunner.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java index 348cab1594e8e..88021968f3a8b 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java @@ -618,10 +618,9 @@ public String apply(Class aClass) { ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); cr.accept(new TestTracingProcessor.TracingClassVisitor(writer, i), 0); transformedClasses.put(i.replace('.', '/') + ".class", writer.toByteArray()); - } catch (IOException e) { - throw new RuntimeException(e); + } catch (Exception e) { + log.error("Failed to instrument " + i + " for usage tracking", e); } - } cl = testApplication.createRuntimeClassLoader(testApplication.getAugmentClassLoader(), Collections.emptyMap(), transformedClasses);