From bbb3a70f07f17cffb79a15db5b0509b2762a8da9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 14 Jul 2021 16:51:43 -0700 Subject: [PATCH] test/e2e/upgrade/upgrade: Unify duration-overshoot test-case name 5c5627526a (Bug 1942164: Fix time calc ordering for upgrades, 2021-07-13, #26324) adjusted how the failure-mode test-case name was formed, but did not adjust the success-mode test-case name. This commit restructures to make it impossible to diverge going forward. --- test/e2e/upgrade/upgrade.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/upgrade/upgrade.go b/test/e2e/upgrade/upgrade.go index 669a19d930c7..e4ee837d236a 100644 --- a/test/e2e/upgrade/upgrade.go +++ b/test/e2e/upgrade/upgrade.go @@ -441,11 +441,12 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam // record whether the cluster was fast or slow upgrading. Don't fail the test, we still want signal on the actual tests themselves. upgradeEnded := time.Now() upgradeDuration := upgradeEnded.Sub(upgradeStarted) + testCaseName := fmt.Sprintf("[sig-cluster-lifecycle] cluster upgrade should complete in %0.2f minutes", durationToSoftFailure.Minutes()) + failure := "" if upgradeDuration > durationToSoftFailure { - disruption.RecordJUnitResult(f, fmt.Sprintf("[sig-cluster-lifecycle] cluster upgrade should complete in %0.2f minutes", durationToSoftFailure.Minutes()), upgradeDuration, fmt.Sprintf("%s to %s took too long: %0.2f minutes", action, versionString(desired), upgradeDuration.Minutes())) - } else { - disruption.RecordJUnitResult(f, fmt.Sprintf("[sig-cluster-lifecycle] cluster upgrade should complete in %v minutes", durationToSoftFailure), upgradeDuration, "") + failure = fmt.Sprintf("%s to %s took too long: %0.2f minutes", action, versionString(desired), upgradeDuration.Minutes()) } + disruption.RecordJUnitResult(f, testCaseName, upgradeDuration, failure) return nil },