Skip to content

Commit

Permalink
Fix location of assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Dec 6, 2023
1 parent 128f824 commit 3e5e27c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions testing/upgradetest/upgrader.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,6 @@ func PerformUpgrade(
return err
}

// Check that, upon successful upgrade, the upgrade details have been cleared out
// from Agent status.
logger.Logf("Checking upgrade details state after successful upgrade")
if err := waitUpgradeDetailsState(ctx, startFixture, "", 2*time.Minute, 10*time.Second, logger); err != nil {
// error context added by checkUpgradeDetailsState
return err
}

// it is unstable to continue until the watcher is done
// the maximum wait time is 1 minutes (2 minutes for grace) some older versions
// do not respect the `ConfigureFastWatcher` so we have to kill the watcher after the
Expand All @@ -299,6 +291,14 @@ func PerformUpgrade(
}
logger.Logf("upgrade watcher finished")

// Check that, upon successful upgrade, the upgrade details have been cleared out
// from Agent status.
logger.Logf("Checking upgrade details state after successful upgrade")
if err := waitUpgradeDetailsState(ctx, startFixture, "", 2*time.Minute, 10*time.Second, logger); err != nil {
// error context added by checkUpgradeDetailsState
return err
}

// now that the watcher has stopped lets ensure that it's still the expected
// version, otherwise it's possible that it was rolled back to the original version
err = CheckHealthyAndVersion(ctx, startFixture, endVersionInfo.Binary)
Expand Down

0 comments on commit 3e5e27c

Please sign in to comment.