From 4e8deb396e38c69de22b6348dca637d814d73aef Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Mon, 27 May 2024 06:32:21 +0000 Subject: [PATCH] 8332922: Test java/io/IO/IO.java fails when /usr/bin/expect not exist Reviewed-by: djelinski --- test/jdk/java/io/IO/IO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/jdk/java/io/IO/IO.java b/test/jdk/java/io/IO/IO.java index 9b35fe1ab81..1a9a25c90c7 100644 --- a/test/jdk/java/io/IO/IO.java +++ b/test/jdk/java/io/IO/IO.java @@ -29,7 +29,7 @@ import java.util.stream.Stream; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import jtreg.SkippedException; +import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.condition.EnabledOnOs; @@ -60,7 +60,7 @@ public class IO { public static void prepareTTY() { expect = Paths.get("/usr/bin/expect"); // os-specific path if (!Files.exists(expect) || !Files.isExecutable(expect)) { - throw new SkippedException("'" + expect + "' not found"); + Assumptions.abort("'" + expect + "' not found"); } }