From 8dd448df790b7b9e9433d2edba39708c7884f16b Mon Sep 17 00:00:00 2001 From: Austen McClernon Date: Thu, 19 Oct 2023 23:30:01 +0000 Subject: [PATCH] streamingccl: reduce scan interval for testing Reduce the replica scanner min interval from 1s, to 10ms for test clusters. This speeds up tests which rely on replica changes either on the source, or host cluster. ``` dev test pkg/ccl/streamingccl/streamingest \ -f TestStreamingRegionalConstraint -v --stress ... Stats over 1000 runs: max = 51.9s, min = 21.6s, avg = 38.3s, dev = 4.6s ``` Resolves: #112541 Release note: None --- pkg/ccl/streamingccl/replicationtestutils/testutils.go | 1 + .../streamingccl/streamingest/replication_stream_e2e_test.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/ccl/streamingccl/replicationtestutils/testutils.go b/pkg/ccl/streamingccl/replicationtestutils/testutils.go index 90bcf0795124..f292c8b54e89 100644 --- a/pkg/ccl/streamingccl/replicationtestutils/testutils.go +++ b/pkg/ccl/streamingccl/replicationtestutils/testutils.go @@ -360,6 +360,7 @@ func startC2CTestCluster( for i, locality := range regions { param := serverArgs param.Locality = makeLocality(locality) + param.ScanMaxIdleTime = 10 * time.Millisecond serverArgsPerNode[i] = param } params.ServerArgsPerNode = serverArgsPerNode diff --git a/pkg/ccl/streamingccl/streamingest/replication_stream_e2e_test.go b/pkg/ccl/streamingccl/streamingest/replication_stream_e2e_test.go index 3bfa20036c3d..de1355e5c9a2 100644 --- a/pkg/ccl/streamingccl/streamingest/replication_stream_e2e_test.go +++ b/pkg/ccl/streamingccl/streamingest/replication_stream_e2e_test.go @@ -1204,7 +1204,8 @@ func TestStreamingRegionalConstraint(t *testing.T) { for _, desc := range descriptors { for _, replica := range desc.InternalReplicas { if replica.NodeID != marsNodeID { - return errors.Newf("found table data located on another node %d", replica.NodeID) + return errors.Newf("found table data located on another node %d, desc %v", + replica.NodeID, desc) } } }