mongodb-memory-server-core
Advanced tools
Comparing version 5.1.8 to 5.1.9
@@ -6,2 +6,14 @@ # Change Log | ||
## [5.1.9](https://github.com/nodkz/mongodb-memory-server/compare/v5.1.8...v5.1.9) (2019-07-24) | ||
### Bug Fixes | ||
* add fail message when mongod cannot find CURL_OPENSSL_3 ([2ba4ae5](https://github.com/nodkz/mongodb-memory-server/commit/2ba4ae5)) | ||
* avoid infinite loop when waiting Primary ([b19c4bf](https://github.com/nodkz/mongodb-memory-server/commit/b19c4bf)) | ||
## [5.1.8](https://github.com/nodkz/mongodb-memory-server/compare/v5.1.7...v5.1.8) (2019-07-23) | ||
@@ -8,0 +20,0 @@ |
@@ -81,4 +81,4 @@ /// <reference types="node" /> | ||
_startServer(instanceOpts: MongoMemoryInstancePropT): MongoMemoryServer; | ||
_waitForPrimary(): Promise<boolean>; | ||
_waitForPrimary(timeout?: number): Promise<boolean>; | ||
} | ||
//# sourceMappingURL=MongoMemoryReplSet.d.ts.map |
@@ -340,5 +340,6 @@ "use strict"; | ||
}; | ||
MongoMemoryReplSet.prototype._waitForPrimary = function () { | ||
MongoMemoryReplSet.prototype._waitForPrimary = function (timeout) { | ||
if (timeout === void 0) { timeout = 30000; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
var replStatus, hasPrimary; | ||
var replStatus, hasPrimary, restTimeout_1; | ||
var _this = this; | ||
@@ -361,4 +362,10 @@ return __generator(this, function (_a) { | ||
if (!hasPrimary) { | ||
this.debug('No PRIMARY yet. Waiting...'); | ||
return [2 /*return*/, new Promise(function (resolve) { return setTimeout(function () { return resolve(_this._waitForPrimary()); }, 500); })]; | ||
restTimeout_1 = timeout - 500; | ||
if (restTimeout_1 <= 0) { | ||
throw new Error("No PRIMARY elected yet. Timeout expired. Exiting..."); | ||
} | ||
this.debug("No PRIMARY yet. Waiting... " + restTimeout_1 + "ms"); | ||
return [2 /*return*/, new Promise(function (resolve) { | ||
return setTimeout(function () { return resolve(_this._waitForPrimary(restTimeout_1)); }, 500); | ||
})]; | ||
} | ||
@@ -365,0 +372,0 @@ return [2 /*return*/, true]; |
@@ -256,2 +256,5 @@ "use strict"; | ||
} | ||
else if (/CURL_OPENSSL_3.*not found/i.test(log)) { | ||
this.instanceFailed('libcurl3 is not available on your system. Mongod requires it and cannot be started without it. You should manually install libcurl3 or try to use older Mongodb version eg. 3.6.12'); | ||
} | ||
else if (/shutting down with code/i.test(log)) { | ||
@@ -258,0 +261,0 @@ // if mongod started succesfully then no error on shutdown! |
{ | ||
"name": "mongodb-memory-server-core", | ||
"version": "5.1.8", | ||
"version": "5.1.9", | ||
"description": "MongoDB Server for testing (core package, without autodownload). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.", | ||
@@ -56,3 +56,3 @@ "main": "lib/index", | ||
}, | ||
"gitHead": "f7487884f34e84a9790d15065b42e09776f56613" | ||
"gitHead": "f3c5964e4c4954386f7c70422ea1add4946498ef" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164255
2249