Browse Source
Merge pull request #6903 from smatvienko-tb/blackbox-tests-wait-for-js-executor-kafka-message
blackbox tests: wait for js-executor kafka message
pull/6906/head
Andrew Shvayka
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ContainerTestSuite.java
|
|
|
@ -55,6 +55,7 @@ public class ContainerTestSuite { |
|
|
|
private static final String TB_CORE_LOG_REGEXP = ".*Starting polling for events.*"; |
|
|
|
private static final String TRANSPORTS_LOG_REGEXP = ".*Going to recalculate partitions.*"; |
|
|
|
private static final String TB_VC_LOG_REGEXP = TRANSPORTS_LOG_REGEXP; |
|
|
|
private static final String TB_JS_EXECUTOR_KAFKA_LOG_REGEXP = ".*Consumer has joined the group.*"; |
|
|
|
private static final Duration CONTAINER_STARTUP_TIMEOUT = Duration.ofSeconds(400); |
|
|
|
|
|
|
|
private static DockerComposeContainer<?> testContainer; |
|
|
|
@ -137,6 +138,7 @@ public class ContainerTestSuite { |
|
|
|
.waitingFor("tb-mqtt-transport2", Wait.forLogMessage(TRANSPORTS_LOG_REGEXP, 1).withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)) |
|
|
|
.waitingFor("tb-vc-executor1", Wait.forLogMessage(TB_VC_LOG_REGEXP, 1).withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)) |
|
|
|
.waitingFor("tb-vc-executor2", Wait.forLogMessage(TB_VC_LOG_REGEXP, 1).withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)); |
|
|
|
.waitingFor("tb-js-executor", Wait.forLogMessage(TB_JS_EXECUTOR_KAFKA_LOG_REGEXP, 1).withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Failed to create test container", e); |
|
|
|
fail("Failed to create test container"); |
|
|
|
|