Skip to content

Commit 5d3dc54

Browse files
committed
roachtest: deflake c2c/disconnect
Previously, the c2c/disconnect roachtest was disconnecting to source nodes, instead of a pair of source/destination nodes. This patch fixes this bug. Informs: #152248 Informs: #150474 Release note: none
1 parent e9a0b1c commit 5d3dc54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cmd/roachtest/tests/cluster_to_cluster.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,17 +2057,19 @@ func registerClusterReplicationDisconnect(r registry.Registry) {
20572057
var dstNode int
20582058
srcTenantSQL.QueryRow(t, `select split_part(consumer, '[', 1) from crdb_internal.cluster_replication_node_streams order by random() limit 1`).Scan(&dstNode)
20592059

2060+
roachprodDstNode := dstNode + sp.srcNodes
2061+
20602062
disconnectDuration := sp.additionalDuration
20612063
rd.t.L().Printf("Disconnecting Src %d, Dest %d for %.2f minutes", srcNode,
2062-
dstNode, disconnectDuration.Minutes())
2064+
roachprodDstNode, disconnectDuration.Minutes())
20632065

20642066
// Normally, the blackholeFailer is accessed through the failer interface,
20652067
// at least in the failover tests. Because this test shouldn't use all the
20662068
// failer interface calls (e.g. Setup(), and Ready()), we use the
20672069
// blakholeFailer struct directly. In other words, in this test, we
20682070
// shouldn't treat the blackholeFailer as an abstracted api.
20692071
blackholeFailer := &blackholeFailer{t: rd.t, c: rd.c, input: true, output: true}
2070-
blackholeFailer.FailPartial(ctx, srcNode, []int{dstNode})
2072+
blackholeFailer.FailPartial(ctx, srcNode, []int{roachprodDstNode})
20712073

20722074
time.Sleep(disconnectDuration)
20732075
// Calling this will log the latest topology.

0 commit comments

Comments
 (0)