Skip to content

Commit

Permalink
fix(discovery test): fixes admin controller test intermittent failures (
Browse files Browse the repository at this point in the history
#4202) (#4249)

(cherry picked from commit f570af6)

Co-authored-by: guido9j <james_guido@homedepot.com>
  • Loading branch information
mergify[bot] and guido9j committed Apr 1, 2022
1 parent 2e2f1f1 commit efc7d1b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ class AdminControllerTest : JUnit5Minutests {
}

test("/admin/instance/enabled endpoint can disable queue Activator") {
// wait up to 5 seconds for discoveryActivator to initialize
for (i in 1..5) {
if (discoveryActivator.enabled){
println("discoveryActivator.enabled = true. Start")
break
}
println("discoveryActivator.enabled = false. Sleep 1sec")
Thread.sleep(1000L)
}

expectThat(discoveryActivator.enabled).isTrue()

val response = mockMvc.post("/admin/instance/enabled") {
Expand Down

0 comments on commit efc7d1b

Please sign in to comment.