mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +09:00
Handle disconnect in link integration test
Handle the prepareDisconnect request properly in the TestControl in test/integration/link.js.
This commit is contained in:
1 parent
5c1214ad38
commit
7a9b6592e6
1 file changed
+5
-5
@@ -12,8 +12,12 @@ class TestControl extends link.Link {
|
|||||||
link.attachAllMessages(this);
|
link.attachAllMessages(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async prepareDisconnectRequestHandler(message, request) {
|
||||||
|
this.connector.setClosing();
|
||||||
|
return await super.prepareDisconnectRequestHandler(message, request);
|
||||||
|
}
|
||||||
|
|
||||||
async debugWsMessageEventHandler() { }
|
async debugWsMessageEventHandler() { }
|
||||||
async prepareDisconnectRequestHandler() { }
|
|
||||||
async instanceOutputEventHandler() { }
|
async instanceOutputEventHandler() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +68,4 @@ describe("Integration of lib/link", function() {
|
|||||||
await events.once(controlConnector, "invalidate");
|
await events.once(controlConnector, "invalidate");
|
||||||
await events.once(controlConnector, "connect");
|
await events.once(controlConnector, "connect");
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async function() {
|
|
||||||
controlConnector.close(1001, "Test Quit");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user