Comparing version 0.25.0 to 0.25.1
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="0.25.1"></a> | ||
## [0.25.1](https://github.com/stryker-mutator/stryker/compare/stryker@0.25.0...stryker@0.25.1) (2018-07-23) | ||
### Bug Fixes | ||
* **Test runner:** Don't crash on first failure ([#1037](https://github.com/stryker-mutator/stryker/issues/1037)) ([94790c3](https://github.com/stryker-mutator/stryker/commit/94790c3)) | ||
<a name="0.25.0"></a> | ||
@@ -8,0 +19,0 @@ # [0.25.0](https://github.com/stryker-mutator/stryker/compare/stryker@0.24.2...stryker@0.25.0) (2018-07-20) |
{ | ||
"name": "stryker", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "The extendable JavaScript mutation testing framework", | ||
@@ -5,0 +5,0 @@ "main": "src/Stryker.js", |
@@ -38,21 +38,37 @@ "use strict"; | ||
}; | ||
RetryDecorator.prototype.tryRun = function (options, retriesLeft, lastError) { | ||
var _this = this; | ||
if (retriesLeft === void 0) { retriesLeft = 2; } | ||
if (retriesLeft > 0) { | ||
this.innerRunner.run(options).then(function (result) { | ||
return _this.currentRunTask.resolve(result); | ||
}, function (rejectReason) { | ||
if (_this.innerProcessIsCrashed(rejectReason)) { | ||
_this.recover().then(function () { return _this.tryRun(options, retriesLeft - 1, rejectReason); }, function (reason) { return _this.currentRunTask.reject(reason); }); | ||
RetryDecorator.prototype.tryRun = function (options, attemptsLeft, lastError) { | ||
if (attemptsLeft === void 0) { attemptsLeft = 2; } | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var result, error_1; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
if (!(attemptsLeft > 0)) return [3 /*break*/, 7]; | ||
_a.label = 1; | ||
case 1: | ||
_a.trys.push([1, 3, , 6]); | ||
return [4 /*yield*/, this.innerRunner.run(options)]; | ||
case 2: | ||
result = _a.sent(); | ||
this.currentRunTask.resolve(result); | ||
return [3 /*break*/, 6]; | ||
case 3: | ||
error_1 = _a.sent(); | ||
return [4 /*yield*/, this.recover()]; | ||
case 4: | ||
_a.sent(); | ||
return [4 /*yield*/, this.tryRun(options, attemptsLeft - 1, error_1)]; | ||
case 5: | ||
_a.sent(); | ||
return [3 /*break*/, 6]; | ||
case 6: return [3 /*break*/, 9]; | ||
case 7: return [4 /*yield*/, this.recover()]; | ||
case 8: | ||
_a.sent(); | ||
this.currentRunTask.resolve({ status: test_runner_1.RunStatus.Error, errorMessages: [ERROR_MESSAGE + objectUtils_1.errorToString(lastError)], tests: [] }); | ||
_a.label = 9; | ||
case 9: return [2 /*return*/]; | ||
} | ||
else { | ||
// Oops... not intended to catch this one | ||
_this.currentRunTask.reject(rejectReason); | ||
} | ||
}); | ||
} | ||
else { | ||
this.recover().then(function () { return _this.currentRunTask.resolve({ status: test_runner_1.RunStatus.Error, errorMessages: [ERROR_MESSAGE + objectUtils_1.errorToString(lastError)], tests: [] }); }, function (reason) { return _this.currentRunTask.reject(reason); }); | ||
} | ||
}); | ||
}; | ||
@@ -59,0 +75,0 @@ RetryDecorator.prototype.recover = function () { |
382110
6985