Skip to content

Commit

Permalink
test: remove use of format in max staleness tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Nov 25, 2019
1 parent 28a944b commit 4d2bd6e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/core/functional/max_staleness_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

const expect = require('chai').expect,
p = require('path'),
f = require('util').format,
fs = require('fs'),
Server = require('../../../lib/core/topologies/server'),
ReplSetState = require('../../../lib/core/topologies/replset_state'),
MongoError = require('../../../lib/core/error').MongoError,
ReadPreference = require('../../../lib/core/topologies/read_preference');

const rsWithPrimaryPath = f('%s/../../spec/max-staleness/ReplicaSetWithPrimary', __dirname);
const rsWithoutPrimaryPath = f('%s/../../spec/max-staleness/ReplicaSetNoPrimary', __dirname);
const rsWithPrimaryPath = p.resolve(__dirname, '../../spec/max-staleness/ReplicaSetWithPrimary');
const rsWithoutPrimaryPath = p.resolve(__dirname, '../../spec/max-staleness/ReplicaSetNoPrimary');

describe('Max Staleness', function() {
describe('ReplicaSet without primary', function() {
Expand All @@ -19,7 +18,7 @@ describe('Max Staleness', function() {
.filter(x => x.indexOf('.json') !== -1)
.forEach(x => {
it(p.basename(x, '.json'), function(done) {
executeEntry(f('%s/%s', rsWithoutPrimaryPath, x), done);
executeEntry(`${rsWithoutPrimaryPath}/${x}`, done);
});
});
});
Expand All @@ -31,7 +30,7 @@ describe('Max Staleness', function() {
.filter(x => x.indexOf('LongHeartbeat2.jwson') === -1)
.forEach(x => {
it(p.basename(x, '.json'), function(done) {
executeEntry(f('%s/%s', rsWithPrimaryPath, x), done);
executeEntry(`${rsWithPrimaryPath}/${x}`, done);
});
});
});
Expand Down

0 comments on commit 4d2bd6e

Please sign in to comment.