Handle disconnect in link integration test

Handle the prepareDisconnect request properly in the TestControl in
test/integration/link.js.
This commit is contained in:
Hornwitser committed 2020-05-07 13:23:11 +02:00
1 parent 5c1214ad38
commit 7a9b6592e6
1 file changed
+5 -5
+5 -5
View File
@@ -12,8 +12,12 @@ class TestControl extends link.Link {
link.attachAllMessages(this);
}
async prepareDisconnectRequestHandler(message, request) {
this.connector.setClosing();
return await super.prepareDisconnectRequestHandler(message, request);
}
async debugWsMessageEventHandler() { }
async prepareDisconnectRequestHandler() { }
async instanceOutputEventHandler() { }
}
@@ -64,8 +68,4 @@ describe("Integration of lib/link", function() {
await events.once(controlConnector, "invalidate");
await events.once(controlConnector, "connect");
});
after(async function() {
controlConnector.close(1001, "Test Quit");
});
});