Skip to content

Commit f4a93ae

Browse files
committed
test: fix failing tests
1 parent faf0116 commit f4a93ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Adapters/Files/GridFSBucketAdapter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ export class GridFSBucketAdapter extends FilesAdapter {
5151
name: 'Parse Server',
5252
version: pkg.version,
5353
};
54-
const mongoclient = new MongoClient(this._databaseURI, this._mongoOptions);
55-
mongoclient.appendMetadata(driverInfo);
56-
this._connectionPromise = mongoclient.connect().then(
54+
this._connectionPromise = MongoClient.connect(this._databaseURI, { ...this._mongoOptions, driverInfo }).then(
5755
client => {
5856
this._client = client;
5957
return client.db(client.s.options.dbName);

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ export class MongoStorageAdapter implements StorageAdapter {
185185
name: 'Parse Server',
186186
version: pkg.version,
187187
}
188-
const mongoclient = new MongoClient(encodedUri, this._mongoOptions)
189-
mongoclient.appendMetadata(driverInfo);
190-
this.connectionPromise = mongoclient.connect()
188+
this.connectionPromise = MongoClient.connect(encodedUri, { ...this._mongoOptions, driverInfo })
191189
.then(client => {
192190
// Starting mongoDB 3.0, the MongoClient.connect don't return a DB anymore but a client
193191
// Fortunately, we can get back the options and use them to select the proper DB.

0 commit comments

Comments
 (0)