Minor improvement in AbstractKeycloakRule.stopServer()
This commit is contained in:
parent
08b0aebe03
commit
0a15f873af
1 changed files with 3 additions and 2 deletions
|
@ -163,8 +163,9 @@ public abstract class AbstractKeycloakRule extends ExternalResource {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
new Socket(server.getConfig().getHost(), server.getConfig().getPort());
|
||||
throw new RuntimeException();
|
||||
Socket s = new Socket(server.getConfig().getHost(), server.getConfig().getPort());
|
||||
s.close();
|
||||
throw new IllegalStateException("Server still running");
|
||||
} catch (IOException expected) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue