From 69b37a770e64258080fba758a3252633c706c877 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Mon, 12 Aug 2024 20:27:30 +0200 Subject: [PATCH] Fix TestConnect TypeExit/TypeClose race --- internal/auditlogintegration/integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auditlogintegration/integration_test.go b/internal/auditlogintegration/integration_test.go index b45fb009..a811eca1 100644 --- a/internal/auditlogintegration/integration_test.go +++ b/internal/auditlogintegration/integration_test.go @@ -152,7 +152,7 @@ func checkStoredAuditMessages(t *testing.T, dir string, logger log.Logger) { assert.Equal(t, message.TypeHandshakeSuccessful, messages[3].MessageType) assert.Equal(t, message.TypeNewChannelSuccessful, messages[4].MessageType) assert.Equal(t, message.TypeChannelRequestShell, messages[5].MessageType) - assert.Equal(t, message.TypeClose, messages[6].MessageType) + assert.True(t, messages[6].MessageType == message.TypeExit || messages[6].MessageType == message.TypeClose) assert.True(t, messages[7].MessageType == message.TypeExit || messages[7].MessageType == message.TypeDisconnect) assert.True(t, messages[8].MessageType == message.TypeExit || messages[8].MessageType == message.TypeDisconnect) }