Skip to content

Commit

Permalink
comments pt 3
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jul 30, 2024
1 parent 8e20e0c commit 412829f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ functions:
MONGODB_URI: ${MONGODB_URI}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-resource-management-smoke-tests.sh"
- "${PROJECT_DIRECTORY}/.evergreen/run-resource-management-feature-integration.sh"

"compile driver":
- command: subprocess.exec
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ functions:
MONGODB_URI: ${MONGODB_URI}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-resource-management-smoke-tests.sh
- ${PROJECT_DIRECTORY}/.evergreen/run-resource-management-feature-integration.sh
compile driver:
- command: subprocess.exec
type: test
Expand Down
4 changes: 1 addition & 3 deletions test/explicit-resource-management/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function setUpCollection(client: MongoClient) {
return collection;
}

describe('explicit resource management smoke tests', function () {
describe('explicit resource management feature integration tests', function () {
describe('MongoClient', function () {
it('does not crash or error when used with await-using syntax', async function () {
await using client = new MongoClient(process.env.MONGODB_URI!);
Expand All @@ -31,8 +31,6 @@ describe('explicit resource management smoke tests', function () {

await using cursor = collection.find();
await cursor.next();
await cursor.next();
await cursor.next();
})

describe('cursor streams', function() {
Expand Down
4 changes: 1 addition & 3 deletions test/explicit-resource-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"@types/chai": "^4.3.16",
"chai": "^4.4.1",
"mongodb": "../../mongodb-current.tgz",
"tslib": "^2.6.3"
},
"devDependencies": {
"tslib": "^2.6.3",
"mocha": "^10.7.0",
"typescript": "5.5"
}
Expand Down
8 changes: 4 additions & 4 deletions test/manual/resource_management.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Symbol.asyncDispose implementation tests', function () {
});

describe('MongoClient', function () {
it('closes the the client', async function () {
it('the Symbol.asyncDispose method calls close()', async function () {
client = new MongoClient('mongodb://localhost:27017');

const spy = sinon.spy(client, 'close');
Expand All @@ -29,7 +29,7 @@ describe('Symbol.asyncDispose implementation tests', function () {
});

describe('ClientSession', function () {
it('ends the session', async function () {
it('the Symbol.asyncDispose method calls endSession()', async function () {
client = new MongoClient('mongodb://localhost:27017');
const session = client.startSession();

Expand All @@ -40,7 +40,7 @@ describe('Symbol.asyncDispose implementation tests', function () {
});

describe('ChangeStreams', function () {
it('closes the change stream', async function () {
it('the Symbol.asyncDispose method calls close()', async function () {
client = new MongoClient('mongodb://localhost:27017');
const changeStream = client.watch();

Expand All @@ -51,7 +51,7 @@ describe('Symbol.asyncDispose implementation tests', function () {
});

describe('cursors', function () {
it('closes the cursor', async function () {
it('the Symbol.asyncDispose method calls close()', async function () {
client = new MongoClient('mongodb://localhost:27017');
const cursor = client.db('foo').collection('bar').find();

Expand Down
2 changes: 1 addition & 1 deletion test/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Below is a summary of the types of test automation in this repo.
| TypeScript Definition | `/test/types` | The TypeScript definition tests verify the type definitions are correct. | `npm run check:tsd` |
| GitHub Actions | `/test/action` | Tests that run as GitHub Actions such as dependency checking. | Currently, only `npm run check:dependencies` but could be expanded to more in the future. |
| Code Examples | `/test/integration/node-specific/examples` | Code examples that are also paired with tests that show they are working examples. | Currently, `npm run check:lambda` to test the AWS Lambda example with default auth and `npm run check:lambda:aws` to test the AWS Lambda example with AWS auth. |
| Explicit Resource Management | `/test/integration/explicit-resource-management` | Tests that use explicit resource management with the drivers' disposable resources. | `bash .evergreen/run-resource-management-smoke-test.sh` |
| Explicit Resource Management | `/test/integration/explicit-resource-management` | Tests that use explicit resource management with the driver's disposable resources. | `bash .evergreen/run-resource-management-feature-integration.sh` |

### Spec Tests

Expand Down

0 comments on commit 412829f

Please sign in to comment.