From 148b2073877e947948af46cee5fc1756a2b11804 Mon Sep 17 00:00:00 2001 From: ispasov Date: Wed, 18 Feb 2026 12:06:37 +0200 Subject: [PATCH] Remove flaky test The test was undeterministic as in the case where the context was cancelled, it is not guaranteed that the runner will be deleted at all. --- pkg/runner-provisioner/provisioner_test.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pkg/runner-provisioner/provisioner_test.go b/pkg/runner-provisioner/provisioner_test.go index 6181503..3caa0e9 100644 --- a/pkg/runner-provisioner/provisioner_test.go +++ b/pkg/runner-provisioner/provisioner_test.go @@ -193,28 +193,6 @@ var _ = Describe("RunnerProvisioner", func() { Expect(mockActions.DeleteRunnerCalls).To(Equal(1)) }) }) - - Context("when context is cancelled", func() { - It("should stop polling and return", func() { - cancelCtx, cancel := context.WithCancel(ctx) - - // Runner never de-registers, but we'll cancel the context - mockActions.GetRunnerFunc = func(ctx context.Context, runnerName string) (*types.RunnerReference, error) { - // Cancel context after first check - cancel() - return &types.RunnerReference{Id: 888, Name: runnerName}, nil - } - mockActions.DeleteRunnerFunc = func(ctx context.Context, runnerID int) error { - return nil - } - - _ = provisioner.ensureRunnerDeregistered(cancelCtx, testRunnerName) - - // Should have attempted at least one check and force-deleted - Expect(mockActions.GetRunnerCalls).To(BeNumerically(">=", 1)) - Expect(mockActions.DeleteRunnerCalls).To(Equal(1)) - }) - }) }) Describe("forceDeleteRunner", func() {