mirror of
https://github.com/keycloak/keycloak.git
synced 2026-02-03 20:39:33 -05:00
Test framework doesn't stop running Keycloak instance if reuse is turned off
Closes #45750 Signed-off-by: Stian Thorgersen <st@li-fbf8e8cc-23c4-11b2-a85c-be35f7de969a.ibm.com> Co-authored-by: Stian Thorgersen <st@li-fbf8e8cc-23c4-11b2-a85c-be35f7de969a.ibm.com>
This commit is contained in:
parent
77704a91b6
commit
c51e1af941
1 changed files with 8 additions and 5 deletions
|
|
@ -71,12 +71,11 @@ public class DistributionKeycloakServer implements KeycloakServer {
|
|||
List<String> args = keycloakServerConfigBuilder.toArgs();
|
||||
Set<Dependency> dependencies = keycloakServerConfigBuilder.toDependencies();
|
||||
|
||||
if (!reuse) {
|
||||
killPreviousProcess();
|
||||
}
|
||||
|
||||
try {
|
||||
boolean installationCreated = createInstallation();
|
||||
if (!reuse) {
|
||||
killPreviousProcess();
|
||||
}
|
||||
|
||||
File providersDir = new File(keycloakHomeDir, "providers");
|
||||
List<File> existingProviders = listExistingProviders(providersDir);
|
||||
|
|
@ -426,13 +425,17 @@ public class DistributionKeycloakServer implements KeycloakServer {
|
|||
}
|
||||
} catch (IOException e) {
|
||||
// Ignored
|
||||
} finally {
|
||||
if (startupLatch.getCount() != 0) {
|
||||
startupLatch.countDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean waitForStarted() {
|
||||
try {
|
||||
startupLatch.await(startTimeout, TimeUnit.SECONDS);
|
||||
return true;
|
||||
return process.isAlive();
|
||||
} catch (InterruptedException e) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue