Skip to content

Commit d0861e6

Browse files
committed
test(NODE-4271): never promote in spec tests
1 parent 90d2531 commit d0861e6

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

test/tools/spec-runner/context.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class TestRunnerContext {
7878

7979
setup(config) {
8080
this.sharedClient = config.newClient(
81-
resolveConnectionString(config, { useMultipleMongoses: true }, this)
81+
resolveConnectionString(config, { useMultipleMongoses: true }, this),
82+
{ promoteValues: false, promoteLongs: false }
8283
);
8384
if (config.topologyType === 'Sharded') {
8485
this.failPointClients = config.options.hostAddresses.map(proxy => {

test/tools/spec-runner/index.js

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -95,33 +95,14 @@ function translateClientOptions(options) {
9595
return options;
9696
}
9797

98-
function isRelaxed(fileName) {
99-
return (
100-
!fileName.includes('fle2-CreateCollection') &&
101-
!fileName.includes('fle2-BypassQueryAnalysis') &&
102-
!fileName.includes('fle2-validatorAndPartialFieldExpression') &&
103-
!fileName.includes('fle2-EncryptedFields-vs-jsonSchema') &&
104-
!fileName.includes('fle2-FindOneAndUpdate') &&
105-
!fileName.includes('fle2-InsertFind-Indexed') &&
106-
!fileName.includes('fle2-InsertFind-Unindexed') &&
107-
!fileName.includes('fle2-Update') &&
108-
!fileName.includes('fle2-Delete')
109-
);
110-
}
111-
11298
function gatherTestSuites(specPath) {
11399
return fs
114100
.readdirSync(specPath)
115101
.filter(x => x.indexOf('.json') !== -1)
116102
.map(x =>
117-
Object.assign(
118-
EJSON.parse(fs.readFileSync(path.join(specPath, x)), {
119-
relaxed: isRelaxed(x)
120-
}),
121-
{
122-
name: path.basename(x, '.json')
123-
}
124-
)
103+
Object.assign(EJSON.parse(fs.readFileSync(path.join(specPath, x)), { relaxed: false }), {
104+
name: path.basename(x, '.json')
105+
})
125106
);
126107
}
127108

@@ -377,7 +358,9 @@ function runTestSuiteTest(configuration, spec, context) {
377358
minHeartbeatFrequencyMS: 100,
378359
monitorCommands: true,
379360
...spec.clientOptions,
380-
[Symbol.for('@@mdb.skipPingOnConnect')]: true
361+
[Symbol.for('@@mdb.skipPingOnConnect')]: true,
362+
promoteValues: false,
363+
promoteLongs: false
381364
});
382365

383366
const url = resolveConnectionString(configuration, spec, context);

0 commit comments

Comments
 (0)