Skip to content

Commit 9568d99

Browse files
committed
Merge branch 'master' of github.com:nodkz/mongodb-memory-server
2 parents c301eaa + 10118fe commit 9568d99

File tree

15 files changed

+142
-14
lines changed

15 files changed

+142
-14
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.3](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.2...v5.2.3) (2019-09-11)
7+
8+
9+
### Bug Fixes
10+
11+
* clearTimeout when waiting for primary ([08aa26f](https://github.com/nodkz/mongodb-memory-server/commit/08aa26f))
12+
13+
14+
15+
16+
17+
## [5.2.2](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.1...v5.2.2) (2019-09-09)
18+
19+
20+
### Bug Fixes
21+
22+
* download url exception for win32 & v4.2.0 ([bf8ff9e](https://github.com/nodkz/mongodb-memory-server/commit/bf8ff9e))
23+
24+
25+
26+
27+
628
## [5.2.1](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.0...v5.2.1) (2019-09-04)
729

830

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "5.2.1",
2+
"version": "5.2.3",
33
"command": {
44
"publish": {
55
"allowBranch": [

packages/mongodb-memory-server-core/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.3](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.2...v5.2.3) (2019-09-11)
7+
8+
9+
### Bug Fixes
10+
11+
* clearTimeout when waiting for primary ([08aa26f](https://github.com/nodkz/mongodb-memory-server/commit/08aa26f))
12+
13+
14+
15+
16+
17+
## [5.2.2](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.1...v5.2.2) (2019-09-09)
18+
19+
20+
### Bug Fixes
21+
22+
* download url exception for win32 & v4.2.0 ([bf8ff9e](https://github.com/nodkz/mongodb-memory-server/commit/bf8ff9e))
23+
24+
25+
26+
27+
628
## [5.2.1](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.0...v5.2.1) (2019-09-04)
729

830

packages/mongodb-memory-server-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-core",
3-
"version": "5.2.1",
3+
"version": "5.2.3",
44
"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.",
55
"main": "lib/index",
66
"types": "lib/index.d.ts",

packages/mongodb-memory-server-core/src/MongoMemoryReplSet.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ export default class MongoMemoryReplSet extends EventEmitter {
263263
}
264264

265265
async _waitForPrimary(timeout: number = 30000): Promise<void> {
266+
let timeoutId: NodeJS.Timeout | undefined;
266267
const timeoutPromise = new Promise((resolve, reject) => {
267-
let id = setTimeout(() => {
268-
clearTimeout(id);
268+
timeoutId = setTimeout(() => {
269269
reject('Timed out in ' + timeout + 'ms. When waiting for primary.');
270270
}, timeout);
271271
});
@@ -281,6 +281,10 @@ export default class MongoMemoryReplSet extends EventEmitter {
281281
timeoutPromise,
282282
]);
283283

284+
if (timeoutId != null) {
285+
clearTimeout(timeoutId);
286+
}
287+
284288
this.debug('_waitForPrimary detected one primary instance ');
285289
}
286290
}

packages/mongodb-memory-server-global-3.4/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.3](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.2...v5.2.3) (2019-09-11)
7+
8+
**Note:** Version bump only for package mongodb-memory-server-global-3.4
9+
10+
11+
12+
13+
14+
## [5.2.2](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.1...v5.2.2) (2019-09-09)
15+
16+
**Note:** Version bump only for package mongodb-memory-server-global-3.4
17+
18+
19+
20+
21+
622
## [5.2.1](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.0...v5.2.1) (2019-09-04)
723

824
**Note:** Version bump only for package mongodb-memory-server-global-3.4

packages/mongodb-memory-server-global-3.4/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global-3.4",
3-
"version": "5.2.1",
3+
"version": "5.2.3",
44
"mongodb_version": "3.4.20",
55
"description": "MongoDB Server for testing (auto-download 3.4 version to %HOME/.cache/mongodb-binaries).",
66
"main": "index.js",
@@ -22,7 +22,7 @@
2222
"mongomem"
2323
],
2424
"dependencies": {
25-
"mongodb-memory-server": "5.2.1",
25+
"mongodb-memory-server": "5.2.3",
2626
"os": "^0.1.1"
2727
},
2828
"scripts": {

packages/mongodb-memory-server-global-3.6/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.3](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.2...v5.2.3) (2019-09-11)
7+
8+
**Note:** Version bump only for package mongodb-memory-server-global-3.6
9+
10+
11+
12+
13+
14+
## [5.2.2](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.1...v5.2.2) (2019-09-09)
15+
16+
**Note:** Version bump only for package mongodb-memory-server-global-3.6
17+
18+
19+
20+
21+
622
## [5.2.1](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.0...v5.2.1) (2019-09-04)
723

824
**Note:** Version bump only for package mongodb-memory-server-global-3.6

packages/mongodb-memory-server-global-3.6/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global-3.6",
3-
"version": "5.2.1",
3+
"version": "5.2.3",
44
"mongodb_version": "3.6.12",
55
"description": "MongoDB Server for testing (auto-download 3.6 version to %HOME/.cache/mongodb-binaries).",
66
"main": "index.js",
@@ -22,7 +22,7 @@
2222
"mongomem"
2323
],
2424
"dependencies": {
25-
"mongodb-memory-server": "5.2.1",
25+
"mongodb-memory-server": "5.2.3",
2626
"os": "^0.1.1"
2727
},
2828
"scripts": {

packages/mongodb-memory-server-global-4.0/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.2.3](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.2...v5.2.3) (2019-09-11)
7+
8+
**Note:** Version bump only for package mongodb-memory-server-global-4.0
9+
10+
11+
12+
13+
14+
## [5.2.2](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.1...v5.2.2) (2019-09-09)
15+
16+
**Note:** Version bump only for package mongodb-memory-server-global-4.0
17+
18+
19+
20+
21+
622
## [5.2.1](https://github.com/nodkz/mongodb-memory-server/compare/v5.2.0...v5.2.1) (2019-09-04)
723

824
**Note:** Version bump only for package mongodb-memory-server-global-4.0

0 commit comments

Comments
 (0)