Skip to content

Commit 5744fc2

Browse files
committed
test(unified-topology): final batch of tests skipped when unified
1 parent c0c9c05 commit 5744fc2

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

test/functional/mongo_client_tests.js

+5
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,11 @@ describe('MongoClient', function() {
609609
// The actual test we wish to run
610610
test: function(done) {
611611
var configuration = this.configuration;
612+
if (configuration.usingUnifiedTopology()) {
613+
// this is no longer relevant with the unified topology
614+
return this.skip();
615+
}
616+
612617
var url = configuration
613618
.url()
614619
.replace('rs_name=rs', '')

test/functional/sharding_connection_tests.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ describe('Sharding (Connection)', function() {
1717
// The actual test we wish to run
1818
test: function(done) {
1919
const configuration = this.configuration;
20+
if (configuration.usingUnifiedTopology()) {
21+
// disable for inspection of legacy properties
22+
return this.skip();
23+
}
2024

2125
const url = `${configuration.url()}?w=1&readPreference=secondaryPreferred&readPreferenceTags=sf%3A1`;
22-
2326
const client = configuration.newClient(url, { haInterval: 500, useNewUrlParser: true });
2427

2528
client.connect(err => {
@@ -81,6 +84,10 @@ describe('Sharding (Connection)', function() {
8184
// The actual test we wish to run
8285
test: function(done) {
8386
const configuration = this.configuration;
87+
if (configuration.usingUnifiedTopology()) {
88+
// disable for inspection of legacy properties
89+
return this.skip();
90+
}
8491

8592
const url = `${configuration.url()}?w=1&readPreference=secondaryPreferred&readPreferenceTags=sf%3A1`;
8693

@@ -123,6 +130,11 @@ describe('Sharding (Connection)', function() {
123130
// The actual test we wish to run
124131
test: function(done) {
125132
const configuration = this.configuration;
133+
if (configuration.usingUnifiedTopology()) {
134+
// disable for inspection of legacy properties
135+
return this.skip();
136+
}
137+
126138
const url = `${configuration.url()}?w=1&readPreference=secondaryPreferred&readPreferenceTags=sf%3A1`;
127139

128140
const client = configuration.newClient(url, { useNewUrlParser: true, reconnectTries: 10 });

test/functional/transactions_tests.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class TransactionsTestContext {
9696
setup(config) {
9797
this.url = `mongodb://${config.host}:${config.port}/?replicaSet=${config.replicasetName}`;
9898

99-
this.sharedClient = config.newClient(this.url, { serverSelectionTimeoutMS: 10000 });
99+
this.sharedClient = config.newClient(this.url);
100100
return this.sharedClient.connect();
101101
}
102102

@@ -546,6 +546,7 @@ function testOperation(operation, obj, context, options) {
546546
const errorLabelsOmit = result.errorLabelsOmit;
547547

548548
if (errorLabelsContain) {
549+
expect(err).to.have.property('errorLabels');
549550
expect(err.errorLabels).to.include.members(errorLabelsContain);
550551
}
551552

0 commit comments

Comments
 (0)