Skip to content

Commit e1f63cd

Browse files
committed
Get correct leader election holder ID in upgrade test
1 parent ee4319c commit e1f63cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/suite/upgrade_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,12 @@ var _ = Describe("Upgrade testing", Label("nfr", "upgrade"), func() {
208208
500*time.Millisecond,
209209
true, /* poll immediately */
210210
func(_ context.Context) (bool, error) {
211+
defer GinkgoRecover()
211212
Expect(k8sClient.Get(leaseCtx, key, &lease)).To(Succeed())
212213

213214
if lease.Spec.HolderIdentity != nil {
214215
for _, podName := range podNames {
215-
if podName == *lease.Spec.HolderIdentity {
216+
if podName == strings.Split(*lease.Spec.HolderIdentity, "_")[0] {
216217
return true, nil
217218
}
218219
}

0 commit comments

Comments
 (0)