diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index 3f7b833d59..cf0254e9ca 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -127,9 +127,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 @@ -1966,36 +1966,36 @@ func PlatformByName(t *testing.T, ctx context.Context, ns string, name string) f } func CopyIntegrationKits(t *testing.T, ctx context.Context, ns, operatorID string) error { - opns := GetEnvOrDefault("CAMEL_K_GLOBAL_OPERATOR_NS", TestDefaultNamespace) - - lst := v1.NewIntegrationKitList() - if err := TestClient(t).List(ctx, &lst, ctrl.InNamespace(opns)); err != nil { - failTest(t, err) - } - for _, kit := range lst.Items { - if kit.Status.Image != "" { - copyKit := v1.IntegrationKit{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: ns, - Name: kit.Name, - }, - Spec: *kit.Spec.DeepCopy(), - } - - if copyKit.Labels == nil { - copyKit.Labels = make(map[string]string) - } - - copyKit.Labels[v1.IntegrationKitTypeLabel] = v1.IntegrationKitTypeExternal - copyKit.Spec.Image = kit.Status.Image - - v1.SetAnnotation(©Kit.ObjectMeta, v1.OperatorIDAnnotation, operatorID) - fmt.Printf("Copy integration kit %s from namespace %s\n", kit.Name, opns) - if err := CreateIntegrationKit(t, ctx, ©Kit)(); err != nil { - return err - } - } - } + //opns := GetEnvOrDefault("CAMEL_K_GLOBAL_OPERATOR_NS", TestDefaultNamespace) + // + //lst := v1.NewIntegrationKitList() + //if err := TestClient(t).List(ctx, &lst, ctrl.InNamespace(opns)); err != nil { + // failTest(t, err) + //} + //for _, kit := range lst.Items { + // if kit.Status.Image != "" && kit.Status.Phase == v1.IntegrationKitPhaseReady { + // copyKit := v1.IntegrationKit{ + // ObjectMeta: metav1.ObjectMeta{ + // Namespace: ns, + // Name: kit.Name, + // }, + // Spec: *kit.Spec.DeepCopy(), + // } + // + // if copyKit.Labels == nil { + // copyKit.Labels = make(map[string]string) + // } + // + // copyKit.Labels[v1.IntegrationKitTypeLabel] = v1.IntegrationKitTypeExternal + // copyKit.Spec.Image = kit.Status.Image + // + // v1.SetAnnotation(©Kit.ObjectMeta, v1.OperatorIDAnnotation, operatorID) + // fmt.Printf("Copy integration kit %s from namespace %s\n", kit.Name, opns) + // if err := CreateIntegrationKit(t, ctx, ©Kit)(); err != nil { + // return err + // } + // } + //} return nil } 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)