Skip to content

Commit 09a8b17

Browse files
committed
fix csot test?
1 parent 92564d8 commit 09a8b17

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/integration/client-side-operations-timeout/node_csot.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('CSOT driver tests', () => {
109109

110110
beforeEach(async function () {
111111
configClient = this.configuration.newClient();
112-
await configClient
112+
const result = await configClient
113113
.db()
114114
.admin()
115115
.command({
@@ -121,10 +121,11 @@ describe('CSOT driver tests', () => {
121121
blockTimeMS: 10
122122
}
123123
});
124+
expect(result).to.have.property('ok', 1);
124125
});
125126

126127
afterEach(async function () {
127-
await configClient
128+
const result = await configClient
128129
.db()
129130
.admin()
130131
.command({
@@ -136,6 +137,7 @@ describe('CSOT driver tests', () => {
136137
blockTimeMS: 10
137138
}
138139
});
140+
expect(result).to.have.property('ok', 1);
139141
await configClient.close();
140142
});
141143

@@ -156,10 +158,10 @@ describe('CSOT driver tests', () => {
156158
e => e
157159
);
158160

159-
expect(commandsStarted).to.have.length(0); // Ensure that we fail before we start the insertOne
160-
161161
expect(maybeError).to.exist;
162162
expect(maybeError).to.be.instanceof(MongoOperationTimeoutError);
163+
164+
expect(commandsStarted).to.have.length(0); // Ensure that we fail before we start the insertOne
163165
}
164166
});
165167
});

0 commit comments

Comments
 (0)