From 577ffa42db2827a5e6cdd1b9fe3e3caa60414d3d Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Fri, 21 Nov 2025 13:50:22 +0100
Subject: [qemu] Remove System.exit() tests cases
Too annoying to get to work on Java 17+
---
core/modules/qemu/runvirt-plugin-qemu/pom.xml | 8 +-
.../org/openslx/runvirt/plugin/qemu/AppTest.java | 87 ----------------------
2 files changed, 1 insertion(+), 94 deletions(-)
delete mode 100644 core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java
(limited to 'core/modules')
diff --git a/core/modules/qemu/runvirt-plugin-qemu/pom.xml b/core/modules/qemu/runvirt-plugin-qemu/pom.xml
index 1d64e065..5cdf3f93 100644
--- a/core/modules/qemu/runvirt-plugin-qemu/pom.xml
+++ b/core/modules/qemu/runvirt-plugin-qemu/pom.xml
@@ -91,12 +91,6 @@
[2.17,3.0)
compile
-
- com.ginsberg
- junit5-system-exit
- [1.0,2.0)
- test
-
org.libvirt
libvirt
@@ -163,7 +157,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0-M5
+ 3.5.4
org.apache.maven.plugins
diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java b/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java
deleted file mode 100644
index 5bcab1a7..00000000
--- a/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.openslx.runvirt.plugin.qemu;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.config.Configurator;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Nested;
-import org.junit.jupiter.api.Test;
-import org.openslx.runvirt.plugin.qemu.cmdln.CommandLineArgs.CmdLnOption;
-
-import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;
-
-public class AppTest
-{
-
- @BeforeAll
- public static void setUp()
- {
- // disable logging with log4j
- Configurator.setRootLevel( Level.OFF );
- }
-
- @Nested
- public class CmdLnTest
- {
- private final ByteArrayOutputStream out = new ByteArrayOutputStream();
- private final ByteArrayOutputStream err = new ByteArrayOutputStream();
-
- private void setUp()
- {
- // redirect output and error stream content
- System.setOut( new PrintStream( this.out ) );
- System.setErr( new PrintStream( this.err ) );
- }
-
- @Test
- @DisplayName( "Test exit status of application invoked with correct 'help' command line option (short version)" )
- @ExpectSystemExitWithStatus( 0 )
- public void testCmdLnOptionHelpShortCorrectExit()
- {
- String[] argsShortHelpOptionCorrect = { "-" + CmdLnOption.HELP.getShortOption() };
-
- this.setUp();
-
- App.main( argsShortHelpOptionCorrect );
- }
-
- @Test
- @DisplayName( "Test exit status of application invoked with correct 'help' command line option (long version)" )
- @ExpectSystemExitWithStatus( 0 )
- public void testCmdLnOptionHelpLongCorrectExit()
- {
- String[] argsLongHelpOptionCorrect = { "--" + CmdLnOption.HELP.getLongOption() };
-
- this.setUp();
-
- App.main( argsLongHelpOptionCorrect );
- }
-
- @Test
- @DisplayName( "Test exit status of application invoked with incorrect 'help' command line option (short version)" )
- @ExpectSystemExitWithStatus( 1 )
- public void testCmdLnOptionHelpShortIncorrectExit()
- {
- String[] argsShortHelpOptionCorrect = { "---" + CmdLnOption.HELP.getShortOption() };
-
- this.setUp();
-
- App.main( argsShortHelpOptionCorrect );
- }
-
- @Test
- @DisplayName( "Test exit status of application invoked with incorrect 'help' command line option (long version)" )
- @ExpectSystemExitWithStatus( 1 )
- public void testCmdLnOptionHelpLongIncorrectExit()
- {
- String[] argsLongHelpOptionCorrect = { "---" + CmdLnOption.HELP.getLongOption() };
-
- this.setUp();
-
- App.main( argsLongHelpOptionCorrect );
- }
- }
-}
--
cgit v1.2.3-55-g7522