mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Merge remote-tracking branch 'origin/master' into host-pairing
# Conflicts: # test/integration/clusterio.js
This commit is contained in:
36 files changed
+661
-307
No files matched your search
@@ -474,4 +474,26 @@ describe("start-all and stop-all commands", function() {
|
||||
assert.equal(await getInstanceStatus(testInstId3), "stopped");
|
||||
});
|
||||
});
|
||||
|
||||
describe("stop while starting", function() {
|
||||
it("stops the instance once it has started", async function() {
|
||||
this.timeout(30000);
|
||||
const control = getControl();
|
||||
const started = control.sendTo({ instanceId: testInstId1 }, new lib.InstanceStartRequest());
|
||||
// Unroutable until the host has connected the instance
|
||||
for (;;) {
|
||||
try {
|
||||
await control.sendTo({ instanceId: testInstId1 }, new lib.InstanceStopRequest());
|
||||
break;
|
||||
} catch (err) {
|
||||
if (!(err instanceof lib.UnavailableError)) {
|
||||
throw err;
|
||||
}
|
||||
await lib.wait(10);
|
||||
}
|
||||
}
|
||||
await started;
|
||||
assert.equal(await getInstanceStatus(testInstId1), "stopped");
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user