Skip to content

Commit 9119c69

Browse files
committed
test: skip where failpoints aren't supported
1 parent c091e14 commit 9119c69

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/integration/crud/crud_api.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { expect } from 'chai';
22
import { on } from 'events';
3+
import * as semver from 'semver';
34
import * as sinon from 'sinon';
45

56
import {
@@ -111,7 +112,14 @@ describe('CRUD API', function () {
111112
});
112113

113114
describe('when the find operation fails', () => {
114-
beforeEach(async () => {
115+
beforeEach(async function () {
116+
if (semver.lt(this.configuration.version, '4.2.0')) {
117+
if (this.currentTest) {
118+
this.currentTest.skipReason = `Cannot run fail points on server version: ${this.configuration.version}`;
119+
}
120+
return this.currentTest?.skip();
121+
}
122+
115123
const failPoint: FailPoint = {
116124
configureFailPoint: 'failCommand',
117125
mode: 'alwaysOn',

0 commit comments

Comments
 (0)