From 0512810df23c1a59b4026edf2775c5f242f253b6 Mon Sep 17 00:00:00 2001 From: ivanovac Date: Tue, 23 Dec 2025 18:17:28 +0200 Subject: [PATCH 1/2] 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 --- src/ruby/integration/default_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ruby/integration/default_test.go b/src/ruby/integration/default_test.go index 5f4078c70..f18a2e2e4 100644 --- a/src/ruby/integration/default_test.go +++ b/src/ruby/integration/default_test.go @@ -25,11 +25,12 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T var err error name, err = switchblade.RandomName() Expect(err).NotTo(HaveOccurred()) + println(name) }) - it.After(func() { - Expect(platform.Delete.Execute(name)).To(Succeed()) - }) + // it.After(func() { + // Expect(platform.Delete.Execute(name)).To(Succeed()) + // }) context("when the ruby version is specified in the app", func() { it("builds and runs the app with the specified version", func() { @@ -113,7 +114,9 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T Expect(err).NotTo(HaveOccurred()) Expect(logs).To(ContainLines(MatchRegexp(`Installing jruby \d+\.\d+\.\d+\.\d+`))) - Eventually(deployment, 1*time.Minute, 1*time.Second).Should(Serve(ContainSubstring("jruby 3.1.4")).WithEndpoint("/ruby"), logs.String()) + // JRuby needs extra time to warm up after health check passes + // Increase timeout to 3 minutes with 2-second intervals for CI environments + Eventually(deployment, 3*time.Minute, 2*time.Second).Should(Serve(ContainSubstring("jruby 3.1.4")).WithEndpoint("/ruby"), logs.String()) }) }) } From ec7ceb575b5f93607ca18f9b70e7f377f6e5250c Mon Sep 17 00:00:00 2001 From: ivanovac Date: Tue, 23 Dec 2025 18:22:06 +0200 Subject: [PATCH 2/2] remove commented clean-up --- src/ruby/integration/default_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ruby/integration/default_test.go b/src/ruby/integration/default_test.go index f18a2e2e4..cd800f65b 100644 --- a/src/ruby/integration/default_test.go +++ b/src/ruby/integration/default_test.go @@ -28,9 +28,9 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T println(name) }) - // it.After(func() { - // Expect(platform.Delete.Execute(name)).To(Succeed()) - // }) + it.After(func() { + Expect(platform.Delete.Execute(name)).To(Succeed()) + }) context("when the ruby version is specified in the app", func() { it("builds and runs the app with the specified version", func() {