Code aufräumen
This commit is contained in:
+2
-2
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user