Revert e2e parallel

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
This commit is contained in:
faizanahmad055
2026-05-11 22:24:34 +02:00
parent caebfd98f9
commit 2d1c05ef5e
18 changed files with 87 additions and 27 deletions

View File

@@ -52,7 +52,7 @@ func DeployReloader(opts DeployOptions) error {
opts.ReleaseName = DefaultHelmReleaseName
}
if opts.Timeout == "" {
opts.Timeout = "120s"
opts.Timeout = "180s"
}
if opts.Image == "" {
opts.Image = GetTestImage()

View File

@@ -177,6 +177,20 @@ func SetupTestEnvironment(ctx context.Context, namespacePrefix string) (*TestEnv
return env, nil
}
// CleanupOnFailure attempts a best-effort cleanup of the namespace used
// by this environment. It is intended to be deferred in a BeforeSuite
// so that orphaned namespaces don't accumulate on a long-lived cluster
// when the suite setup fails. Errors are logged but not fatal.
func (e *TestEnvironment) CleanupOnFailure() {
if e.Namespace == "" || e.KubeClient == nil {
return
}
cleanupCtx, cancel := context.WithTimeout(context.Background(), 3*time.Minute)
defer cancel()
_ = UndeployReloader(e.Namespace, e.ReleaseName)
_ = DeleteNamespace(cleanupCtx, e.KubeClient, e.Namespace)
}
// Cleanup cleans up the test environment resources.
// It uses a fresh context so it can run safely even after the suite context
// has been cancelled by SynchronizedAfterSuite.