Skip to content

Commit

Permalink
Change timeout for health tracker test (#2132)
Browse files Browse the repository at this point in the history
* Change timeout for health tracker test
  • Loading branch information
johscheuer committed Sep 18, 2024
1 parent e4eaf2c commit 462d5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
11 changes: 5 additions & 6 deletions e2e/fixtures/fdb_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1449,27 +1449,26 @@ 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
}
}

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.
Expand Down
3 changes: 0 additions & 3 deletions e2e/test_operator_ha_upgrades/operator_ha_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 462d5b7

Please sign in to comment.