Skip to content

Commit

Permalink
XXX: Bumped test tiemouts, build timeouts and small fix to kits copy
Browse files Browse the repository at this point in the history
  • Loading branch information
valdar committed Apr 17, 2024
1 parent 0312d46 commit 12c862f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions e2e/support/test_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -2005,11 +2005,12 @@ func CopyIntegrationKits(t *testing.T, ctx context.Context, ns, operatorID strin
Spec: *kit.Spec.DeepCopy(),
}

if copyKit.Labels == nil {
copyKit.Labels = make(map[string]string)
}

copyKit.Labels[v1.IntegrationKitTypeLabel] = v1.IntegrationKitTypeExternal
//if copyKit.Labels == nil {
// copyKit.Labels = make(map[string]string)
//}
//
//copyKit.Labels[v1.IntegrationKitTypeLabel] = v1.IntegrationKitTypeExternal
copyKit.Labels = kit.Labels
copyKit.Spec.Image = kit.Status.Image

v1.SetAnnotation(&copyKit.ObjectMeta, v1.OperatorIDAnnotation, operatorID)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/integrationplatform/initialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/platform/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12c862f

Please sign in to comment.