Skip to content

Commit afa74d6

Browse files
authored
Futzing with read preference (#3963)
* allow setting readpreference when using rest api. * take out partially complete unit test. * oops. nit * Include read preference option for find directly from api and adding few more tests * Adding catch for all tests * Keep same check for get and find * Turn read preference case insensitive * Includes and subqueries read preferences through API * Fixing bugs regarding changes that were done in master branch during the last year * Changing behavior to make includeReadPreference and subqueryReadPreference to follow readPreference by default
1 parent 893f1d3 commit afa74d6

File tree

6 files changed

+939
-357
lines changed

6 files changed

+939
-357
lines changed

spec/GridFSBucketStorageAdapter.spec.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ describe('GridFSBucket and GridStore interop', () => {
4141
expect(gfsResult.toString('utf8')).toBe(twoMegabytesFile);
4242
});
4343

44-
it(
45-
'properly deletes a file from GridFS',
46-
async () => {
47-
const gfsAdapter = new GridFSBucketAdapter(databaseURI);
48-
await gfsAdapter.createFile('myFileName', 'a simple file');
49-
await gfsAdapter.deleteFile('myFileName');
50-
await expectMissingFile(gfsAdapter, 'myFileName');
51-
},
52-
1000000
53-
);
44+
it('properly deletes a file from GridFS', async () => {
45+
const gfsAdapter = new GridFSBucketAdapter(databaseURI);
46+
await gfsAdapter.createFile('myFileName', 'a simple file');
47+
await gfsAdapter.deleteFile('myFileName');
48+
await expectMissingFile(gfsAdapter, 'myFileName');
49+
}, 1000000);
5450

5551
it('properly overrides files', async () => {
5652
const gfsAdapter = new GridFSBucketAdapter(databaseURI);

0 commit comments

Comments
 (0)