Skip to content

Commit 664372c

Browse files
authored
Increase JRuby test endpoint polling timeout (#1090)
* Increase JRuby test endpoint polling timeout JRuby applications need additional warm-up time after the health check passes. Even though the process is running, the JVM/JRuby runtime needs time to fully initialize before it can serve HTTP requests reliably. Changes: - Increased Eventually timeout from 1 minute to 3 minutes - Increased polling interval from 1s to 2s (reduce API load) - This fixes flaky failures in CI environments with higher latency
1 parent 3bc2f38 commit 664372c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/ruby/integration/default_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
2525
var err error
2626
name, err = switchblade.RandomName()
2727
Expect(err).NotTo(HaveOccurred())
28+
println(name)
2829
})
2930

3031
it.After(func() {
@@ -113,7 +114,9 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
113114
Expect(err).NotTo(HaveOccurred())
114115

115116
Expect(logs).To(ContainLines(MatchRegexp(`Installing jruby \d+\.\d+\.\d+\.\d+`)))
116-
Eventually(deployment, 1*time.Minute, 1*time.Second).Should(Serve(ContainSubstring("jruby 3.1.4")).WithEndpoint("/ruby"), logs.String())
117+
// JRuby needs extra time to warm up after health check passes
118+
// Increase timeout to 3 minutes with 2-second intervals for CI environments
119+
Eventually(deployment, 3*time.Minute, 2*time.Second).Should(Serve(ContainSubstring("jruby 3.1.4")).WithEndpoint("/ruby"), logs.String())
117120
})
118121
})
119122
}

0 commit comments

Comments
 (0)