@@ -109,6 +109,7 @@ func (s MongoClickhouseSuite) Test_Simple_Flow_Partitioned() {
109109 flowConnConfig := s .generateFlowConnectionConfigsDefaultEnv (connectionGen )
110110 flowConnConfig .DoInitialSnapshot = true
111111 flowConnConfig .SnapshotNumRowsPerPartition = 10
112+ flowConnConfig .Env ["PEERDB_MONGODB_PARALLEL_SNAPSHOTTING" ] = "true"
112113
113114 adminClient := s .Source ().(* MongoSource ).AdminClient ()
114115 collection := adminClient .Database (srcDatabase ).Collection (srcTable )
@@ -172,6 +173,7 @@ func (s MongoClickhouseSuite) Test_Snapshot_Partition_Capped_To_Timestamp_Range(
172173 // 1 row per partition would normally request 100 partitions for 100 docs,
173174 // but the 5-second timestamp range should cap it to 5 partitions.
174175 flowConnConfig .SnapshotNumRowsPerPartition = 1
176+ flowConnConfig .Env ["PEERDB_MONGODB_PARALLEL_SNAPSHOTTING" ] = "true"
175177
176178 adminClient := s .Source ().(* MongoSource ).AdminClient ()
177179 collection := adminClient .Database (srcDatabase ).Collection (srcTable )
@@ -221,6 +223,7 @@ func (s MongoClickhouseSuite) Test_Snapshot_Empty_Collection() {
221223 flowConnConfig := s .generateFlowConnectionConfigsDefaultEnv (connectionGen )
222224 flowConnConfig .DoInitialSnapshot = true
223225 flowConnConfig .SnapshotNumRowsPerPartition = 1
226+ flowConnConfig .Env ["PEERDB_MONGODB_PARALLEL_SNAPSHOTTING" ] = "true"
224227
225228 adminClient := s .Source ().(* MongoSource ).AdminClient ()
226229 err := adminClient .Database (srcDatabase ).CreateCollection (t .Context (), srcTable )
@@ -255,6 +258,7 @@ func (s MongoClickhouseSuite) Test_Snapshot_Non_ObjectID_Falls_Back_To_Single_Pa
255258 flowConnConfig := s .generateFlowConnectionConfigsDefaultEnv (connectionGen )
256259 flowConnConfig .DoInitialSnapshot = true
257260 flowConnConfig .SnapshotNumRowsPerPartition = 5
261+ flowConnConfig .Env ["PEERDB_MONGODB_PARALLEL_SNAPSHOTTING" ] = "true"
258262
259263 adminClient := s .Source ().(* MongoSource ).AdminClient ()
260264 collection := adminClient .Database (srcDatabase ).Collection (srcTable )
@@ -300,6 +304,7 @@ func (s MongoClickhouseSuite) Test_Snapshot_Mixed_ObjectID_Falls_Back_To_Single_
300304 flowConnConfig := s .generateFlowConnectionConfigsDefaultEnv (connectionGen )
301305 flowConnConfig .DoInitialSnapshot = true
302306 flowConnConfig .SnapshotNumRowsPerPartition = 1
307+ flowConnConfig .Env ["PEERDB_MONGODB_PARALLEL_SNAPSHOTTING" ] = "true"
303308
304309 adminClient := s .Source ().(* MongoSource ).AdminClient ()
305310 collection := adminClient .Database (srcDatabase ).Collection (srcTable )
0 commit comments