Skip to content

Commit b56f026

Browse files
daprahamianmbroadst
authored andcommitted
test: fix test-runner to remove race condition in targeted failpoints
1 parent bb2ae4c commit b56f026

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/functional/transactions_tests.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,14 @@ class TransactionsTestContext {
100100

101101
this.appliedFailPoints = [];
102102

103-
// cleanup
104-
if (context.testClient) {
105-
cleanupPromises.push(
106-
context.testClient.close().then(() => {
103+
return Promise.all(cleanupPromises).then(() => {
104+
// cleanup
105+
if (context.testClient) {
106+
return context.testClient.close().then(() => {
107107
delete context.testClient;
108-
})
109-
);
110-
}
111-
112-
return Promise.all(cleanupPromises);
108+
});
109+
}
110+
});
113111
}
114112

115113
targetedFailPoint(options) {

0 commit comments

Comments
 (0)