From cb16efdc5371a8b304c490e541b429a068db1ba4 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Fri, 28 Apr 2023 13:54:51 +0100 Subject: [PATCH] Merge pull request #12853 from overleaf/jpa-tweak-filestore-test-output [filestore] add ss header to error output when sockets are leaking GitOrigin-RevId: 9aa61c99eaf74a061ea0b524c236abbc6f1c9846 --- services/filestore/test/acceptance/js/FilestoreTests.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/filestore/test/acceptance/js/FilestoreTests.js b/services/filestore/test/acceptance/js/FilestoreTests.js index ab9261901c..2d09e81253 100644 --- a/services/filestore/test/acceptance/js/FilestoreTests.js +++ b/services/filestore/test/acceptance/js/FilestoreTests.js @@ -42,10 +42,12 @@ describe('Filestore', function () { async function expectNoSockets() { try { await msleep(1000) - const { stdout } = await exec('ss -tnH') + const { stdout } = await exec('ss -tn') + const lines = stdout.split('\n') + const header = lines.shift() const badSockets = [] - for (const socket of stdout.split('\n')) { + for (const socket of lines) { const fields = socket.split(' ').filter(part => part !== '') if ( fields.length > 2 && @@ -62,6 +64,7 @@ describe('Filestore', function () { console.error( 'ERR: Sockets still have receive buffer after connection closed' ) + console.error(header) for (const socket of badSockets) { // eslint-disable-next-line no-console console.error(socket)