From 462d5b709510a43b653ec0b97f20149be7ade897 Mon Sep 17 00:00:00 2001 From: Johannes Scheuermann Date: Wed, 18 Sep 2024 20:40:22 +0200 Subject: [PATCH] Change timeout for health tracker test (#2132) * Change timeout for health tracker test --- e2e/fixtures/fdb_cluster.go | 11 +++++------ .../operator_ha_upgrade_test.go | 3 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/e2e/fixtures/fdb_cluster.go b/e2e/fixtures/fdb_cluster.go index cf16586f..6077fdff 100644 --- a/e2e/fixtures/fdb_cluster.go +++ b/e2e/fixtures/fdb_cluster.go @@ -1449,19 +1449,18 @@ func (fdbCluster *FdbCluster) EnsureTeamTrackersAreHealthy() { func (fdbCluster *FdbCluster) EnsureTeamTrackersHaveMinReplicas() { desiredFaultTolerance := fdbCluster.GetCachedCluster().DesiredFaultTolerance() gomega.Eventually(func(g gomega.Gomega) int { - minReplicas := math.MaxInt + status := fdbCluster.GetStatus() // If the status is initializing the team trackers will be missing. This can happen in cases where e.g. // the DD is restarted or when the SS are restarted. This state is only intermediate and will change once the // DD is done analyzing the current state. If we are not checking for this state, we might see intermediate failures // because of a short period where the DD is restarted and therefore the team trackers are empty. - if fdbCluster.GetStatus().Cluster.Data.State.Name == "initializing" { - return desiredFaultTolerance - } + g.Expect(status.Cluster.Data.State.Name).NotTo(gomega.Equal("initializing")) // Make sure that the team trackers are reporting. - teamTrackers := fdbCluster.GetStatus().Cluster.Data.TeamTrackers + teamTrackers := status.Cluster.Data.TeamTrackers g.Expect(teamTrackers).NotTo(gomega.BeEmpty()) + minReplicas := math.MaxInt for _, tracker := range teamTrackers { if minReplicas > tracker.State.MinReplicasRemaining { minReplicas = tracker.State.MinReplicasRemaining @@ -1469,7 +1468,7 @@ func (fdbCluster *FdbCluster) EnsureTeamTrackersHaveMinReplicas() { } return minReplicas - }).WithTimeout(1 * time.Minute).WithPolling(1 * time.Second).MustPassRepeatedly(5).Should(gomega.BeNumerically(">=", desiredFaultTolerance)) + }).WithTimeout(2 * time.Minute).WithPolling(1 * time.Second).Should(gomega.BeNumerically(">=", desiredFaultTolerance)) } // GetListOfUIDsFromVolumeClaims will return of list of UIDs for the current volume claims for the provided processes class. diff --git a/e2e/test_operator_ha_upgrades/operator_ha_upgrade_test.go b/e2e/test_operator_ha_upgrades/operator_ha_upgrade_test.go index 2a1ce2ba..cdf125fb 100644 --- a/e2e/test_operator_ha_upgrades/operator_ha_upgrade_test.go +++ b/e2e/test_operator_ha_upgrades/operator_ha_upgrade_test.go @@ -538,9 +538,6 @@ var _ = Describe("Operator HA Upgrades", Label("e2e", "pr"), func() { Expect(fdbCluster.UpgradeCluster(targetVersion, false)).NotTo(HaveOccurred()) // Verify that the upgrade proceeds fdbCluster.VerifyVersion(targetVersion) - // Make sure the cluster has no data loss - fdbCluster.GetPrimary().EnsureTeamTrackersHaveMinReplicas() - // TODO add validation here processes are updated new version }, EntryDescription("Upgrade from %[1]s to %[2]s"), fixtures.GenerateUpgradeTableEntries(testOptions),