File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
model-server/src/test/kotlin/org/modelix/model/server Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,13 @@ import org.modelix.model.server.handlers.RepositoriesManager
23
23
import org.modelix.model.server.store.InMemoryStoreClient
24
24
import org.modelix.model.server.store.StoreManager
25
25
import org.testcontainers.containers.GenericContainer
26
+ import org.testcontainers.containers.wait.strategy.Wait
26
27
import org.testcontainers.images.builder.Transferable
27
28
import java.net.URI
28
29
import kotlin.test.Test
29
30
import kotlin.test.assertEquals
31
+ import kotlin.time.Duration.Companion.minutes
32
+ import kotlin.time.toJavaDuration
30
33
31
34
private const val ADMIN_USER = " admin"
32
35
private const val ADMIN_PASSWORD = " admin"
@@ -165,6 +168,7 @@ class AuthorizationTest {
165
168
.withEnv(" KEYCLOAK_ADMIN_PASSWORD" , ADMIN_PASSWORD )
166
169
.withExposedPorts(8080 )
167
170
.withCopyToContainer(Transferable .of(REALM_CONFIGURATION ), " /opt/keycloak/data/import/realm.json" )
171
+ .waitingFor(Wait .forListeningPort().withStartupTimeout(3 .minutes.toJavaDuration()))
168
172
.withCommand(" start-dev" , " --import-realm" , " --verbose" )
169
173
170
174
private var keycloakBaseUrl: String
You can’t perform that action at this time.
0 commit comments