shutdown and teardown fixes + incoming connection handler

This commit is contained in:
2025-11-11 17:28:44 +00:00
parent 84cba39597
commit 6b94d727e2
2 changed files with 64 additions and 147 deletions

View File

@@ -97,11 +97,17 @@ public class IntersectionProcessTest {
Files.writeString(configFile, configContent);
}
// cleanup after tests
@AfterEach
public void tearDown() {
if (intersectionProcess != null) {
intersectionProcess.shutdown();
try {
// Only shutdown if still running
intersectionProcess.shutdown();
} catch (Exception e) {
System.err.println("Error in tearDown: " + e.getMessage());
} finally {
intersectionProcess = null;
}
}
}