Skip to content

Commit

Permalink
flaky TestStandaloneUpgradeUninstallKillWatcher (#4146)
Browse files Browse the repository at this point in the history
* flaky TestStandaloneUpgradeUninstallKillWatcher

on windows the watcher needs to start before uninstall due
to potential race condition.

* switch to all OSes

(cherry picked from commit 5f578c5)
  • Loading branch information
leehinman authored and mergify[bot] committed Jan 25, 2024
1 parent fafb1ab commit d06bbfd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testing/integration/upgrade_uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ func TestStandaloneUpgradeUninstallKillWatcher(t *testing.T) {
}
require.NoError(t, err)

// watcher needs to start before uninstall, otherwise you can
// get a race condition where watcher hasn't started before
// uninstall does it's PID check to find the watcher.
watcherErr := upgradetest.WaitForWatcher(ctx, 1*time.Minute, time.Second)
if watcherErr != nil {
t.Logf("watcher failed to start: %s", watcherErr)
}

// call uninstall now, do not wait for the watcher to finish running
// 8.11+ should always kill the running watcher (if it doesn't uninstall will fail)
uninstallCtx, uninstallCancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down

0 comments on commit d06bbfd

Please sign in to comment.