We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e36ab6 + 8523a46 commit 635fe21Copy full SHA for 635fe21
test/util.js
@@ -19,8 +19,10 @@ exports.clearTestData = async function clearTestData(db) {
19
retries -= 1;
20
try {
21
await _inner();
22
+ return;
23
} catch (err) {
- if (err instanceof mongoose.mongo.MongoWriteConcernError && /operation was interrupted/.test(err.message)) {
24
+ const retryable = err instanceof mongoose.mongo.MongoWriteConcernError && /operation was interrupted/.test(err.message);
25
+ if (retryable && retries > 0) {
26
console.log('DropDB operation interrupted, retrying'); // log that a error was thrown to know that it is going to re-try
27
continue;
28
}
0 commit comments