Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit c710605

Browse files
richardschneiderdaviddias
authored andcommitted
fix: generic stop
1 parent 8ecb1b4 commit c710605

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/core/components/stop.js

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ module.exports = (self) => {
1313
return callback(new Error('Already stopped'))
1414
}
1515

16+
if (self.state.state() !== 'running') {
17+
return callback(new Error('Not able to stop from state: ' + self.state.state()))
18+
}
19+
1620
const done = (err) => {
1721
if (err) {
1822
self.emit('error', err)

test/core/interface/generic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const common = {
2626
})
2727
},
2828
teardown: function (callback) {
29-
// Stopped by the tests themselves
29+
// No need to stop, because the test suite does a 'stop' test.
3030
// parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
3131
callback()
3232
}

0 commit comments

Comments
 (0)