Skip to content

Commit f3fcbe1

Browse files
committed
test: remove redundant primary/standby picking logic
If pod-1 is not the primary we'd fail anyway because a timeline bump would make all assertions about the walLogDir fail. Also there's no reason why there should have been a switchover, so we should not hide a failure if that happens. Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent c500320 commit f3fcbe1

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/e2e/internal/tests/walrestore/walrestore.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const (
5959
managerExecutable = "/controller/manager"
6060
// postgresContainer is the container we exec into on instance pods.
6161
postgresContainer = "postgres"
62-
// walLogDir is the wals sub-directory (timeline + log id) the forged segments
62+
// walLogDir is the WALs subdirectory (timeline + log id) the forged segments
6363
// live under; a freshly bootstrapped, idle cluster stays within it.
6464
walLogDir = "0000000100000000"
6565
// bucket is the destination bucket of the minio ObjectStore.
@@ -105,7 +105,7 @@ func execInPod(
105105
// This test drives the plugin's parallel WAL restore directly: it invokes the
106106
// instance-manager wal-restore command on the standby (which delegates to the
107107
// plugin) and asserts the prefetch/spool/end-of-wal-stream state machine with
108-
// maxParallel = 3. To control the archive deterministically it forges WAL
108+
// maxParallel = 3. To control the archive deterministically, it forges WAL
109109
// segments on the object store by copying a real archived segment under new
110110
// names.
111111
var _ = Describe("Parallel WAL restore", func() {
@@ -166,9 +166,6 @@ var _ = Describe("Parallel WAL restore", func() {
166166
primary := cluster.Status.CurrentPrimary
167167
Expect(primary).NotTo(BeEmpty())
168168
standby := clusterName + "-2"
169-
if primary == standby {
170-
standby = clusterName + "-1"
171-
}
172169

173170
var s3ClientPods corev1.PodList
174171
Expect(cl.List(ctx, &s3ClientPods,

0 commit comments

Comments
 (0)