From 4dd75a8c6e257e87460fb128431a8a5016435fae Mon Sep 17 00:00:00 2001 From: Andrea Tarocchi Date: Tue, 9 Apr 2024 14:38:08 +0200 Subject: [PATCH] XXX: Bumped test tiemouts, build timeouts and small fix to kits copy --- e2e/support/test_support.go | 8 ++++---- pkg/controller/integrationplatform/initialize_test.go | 2 +- pkg/platform/defaults.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index c2c2443555..9ba23267a1 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -128,9 +128,9 @@ const ExpectedOSClusterRoles = 1 var TestDefaultNamespace = "default" -var TestTimeoutShort = 1 * time.Minute -var TestTimeoutMedium = 5 * time.Minute -var TestTimeoutLong = 15 * time.Minute +var TestTimeoutShort = 5 * time.Minute +var TestTimeoutMedium = 20 * time.Minute +var TestTimeoutLong = 30 * time.Minute // TestTimeoutVeryLong should be used only for testing native builds. var TestTimeoutVeryLong = 60 * time.Minute @@ -1996,7 +1996,7 @@ func CopyIntegrationKits(t *testing.T, ctx context.Context, ns, operatorID strin failTest(t, err) } for _, kit := range lst.Items { - if kit.Status.Image != "" { + if kit.Status.Image != "" && kit.Status.Phase == v1.IntegrationKitPhaseReady { copyKit := v1.IntegrationKit{ ObjectMeta: metav1.ObjectMeta{ Namespace: ns, diff --git a/pkg/controller/integrationplatform/initialize_test.go b/pkg/controller/integrationplatform/initialize_test.go index b7b3960536..07500406a0 100644 --- a/pkg/controller/integrationplatform/initialize_test.go +++ b/pkg/controller/integrationplatform/initialize_test.go @@ -54,7 +54,7 @@ func TestTimeouts_Default(t *testing.T) { require.NoError(t, err) assert.NotNil(t, answer) - assert.Equal(t, 5*time.Minute, answer.Status.Build.GetTimeout().Duration) + assert.Equal(t, 10*time.Minute, answer.Status.Build.GetTimeout().Duration) } func TestTimeouts_MavenComputedFromBuild(t *testing.T) { diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go index 0f97c46769..6db68b4188 100644 --- a/pkg/platform/defaults.go +++ b/pkg/platform/defaults.go @@ -325,7 +325,7 @@ func setPlatformDefaults(p *v1.IntegrationPlatform, verbose bool) error { // Build timeout if p.Status.Build.GetTimeout().Duration == 0 { p.Status.Build.Timeout = &metav1.Duration{ - Duration: 5 * time.Minute, + Duration: 10 * time.Minute, } } else { d := p.Status.Build.GetTimeout().Duration.Truncate(time.Second)