Skip to content

Commit 8bae9c3

Browse files
authored
Correct check for incompatible clients if the coordinator pod hosted more than one process (#2238)
1 parent 0ca357b commit 8bae9c3

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

e2e/test_operator_upgrades/operator_upgrades_test.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,23 @@ var _ = Describe("Operator Upgrades", Label("e2e", "pr"), func() {
216216
Expect(err).NotTo(HaveOccurred())
217217

218218
// Check if the restarted process is showing up in IncompatibleConnections list in status output.
219-
Eventually(func(g Gomega) bool {
219+
Eventually(func(g Gomega) map[string]fdbv1beta2.None {
220220
status := fdbCluster.GetStatus()
221221
if len(status.Cluster.IncompatibleConnections) == 0 {
222-
return false
222+
return nil
223223
}
224224

225225
log.Println("IncompatibleProcesses:", status.Cluster.IncompatibleConnections)
226-
g.Expect(status.Cluster.IncompatibleConnections).To(HaveLen(1))
227-
// Extract the IP of the incompatible process.
228-
incompatibleProcess := strings.Split(status.Cluster.IncompatibleConnections[0], ":")[0]
229-
return incompatibleProcess == selectedCoordinator.Status.PodIP
230-
}).WithTimeout(180 * time.Second).WithPolling(4 * time.Second).Should(BeTrue())
226+
result := make(map[string]fdbv1beta2.None)
227+
// Ensure that all reported incompatible connections are from the selectedCoordinator.
228+
for _, incompatibleConnection := range status.Cluster.IncompatibleConnections {
229+
parsedAddr, err := fdbv1beta2.ParseProcessAddress(incompatibleConnection)
230+
g.Expect(err).NotTo(HaveOccurred())
231+
result[parsedAddr.MachineAddress()] = fdbv1beta2.None{}
232+
}
233+
234+
return result
235+
}).WithTimeout(180 * time.Second).WithPolling(4 * time.Second).Should(And(HaveLen(1), HaveKey(selectedCoordinator.Status.PodIP)))
231236

232237
// Allow the operator to restart processes and the upgrade should continue and finish.
233238
fdbCluster.SetKillProcesses(true)

0 commit comments

Comments
 (0)