mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
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
This commit is contained in:
parent
e0d9069131
commit
cb16efdc53
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue