File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
test/functional/unified-spec-runner Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { executeOperationAndCheck } from './operations';
88import { matchesEvents } from './match' ;
99import { satisfies as semverSatisfies } from 'semver' ;
1010import { MongoClient } from '../../../src/mongo_client' ;
11+ import { TopologyType } from '../../../src/sdam/common' ;
1112
1213export type TestConfiguration = InstanceType <
1314 typeof import ( '../../tools/runner/config' ) [ 'TestConfiguration' ]
@@ -143,11 +144,8 @@ export async function runUnifiedTest(
143144 // test runners MUST execute a non-transactional distinct command on
144145 // each mongos server before running any test that might execute distinct within a transaction.
145146 // To ease the implementation, test runners MAY execute distinct before every test.
146- if (
147- ctx . topologyType === uni . TopologyType . sharded ||
148- ctx . topologyType === uni . TopologyType . shardedReplicaset ||
149- ctx . topologyType === uni . TopologyType . loadBalanced
150- ) {
147+ const topologyType = ctx . configuration . topologyType ;
148+ if ( topologyType === TopologyType . Sharded || topologyType === TopologyType . LoadBalanced ) {
151149 for ( const [ , collection ] of entities . mapOf ( 'collection' ) ) {
152150 await utilClient . db ( ns ( collection . namespace ) . db ) . command ( {
153151 distinct : collection . collectionName ,
You can’t perform that action at this time.
0 commit comments