Code aufräumen

This commit is contained in:
2026-04-28 08:52:59 +02:00
parent 27b4292c2f
commit 8bb0aabb51
5 changed files with 9 additions and 66 deletions
@@ -39,10 +39,10 @@ class SingleInstanceGuardTest {
@Test
void zweiterAcquireWirftAnotherInstanceRunningException() throws Exception {
int port = freienPortErmitteln();
try (SingleInstanceGuard ersterGuard = new SingleInstanceGuard(port)) {
try (SingleInstanceGuard ersterGuard = new SingleInstanceGuard(port);
SingleInstanceGuard zweiterGuard = new SingleInstanceGuard(port)) {
ersterGuard.acquire();
SingleInstanceGuard zweiterGuard = new SingleInstanceGuard(port);
assertThrows(AnotherInstanceRunningException.class, zweiterGuard::acquire,
"Während der erste Guard aktiv ist, soll der zweite acquire() eine "
+ "AnotherInstanceRunningException werfen.");