From 7a9b6592e60de06667b9fbb901ed2c0e98b1ab12 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Thu, 7 May 2020 13:22:04 +0200 Subject: [PATCH] Handle disconnect in link integration test Handle the prepareDisconnect request properly in the TestControl in test/integration/link.js. --- test/integration/link.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/integration/link.js b/test/integration/link.js index 680e604b..a5f2b95a 100644 --- a/test/integration/link.js +++ b/test/integration/link.js @@ -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"); - }); });