From ab02256aa74a62540ec2323bdfb3709ca272c20f Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Sun, 5 Nov 2023 20:16:36 -0800 Subject: [PATCH] account for small highwater mark test case --- tests/api.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/api.c b/tests/api.c index 1e098fdfb..82b165910 100644 --- a/tests/api.c +++ b/tests/api.c @@ -854,6 +854,14 @@ static void test_wolfSSH_SFTP_SendReadPacket(void) /* If the socket is closed on shutdown, peer is gone, this is OK. */ argsCount = WS_SUCCESS; } + +#if DEFAULT_HIGHWATER_MARK < 8000 + if (argsCount == WS_REKEYING) { + /* in cases where highwater mark is really small a re-key could happen */ + argsCount = WS_SUCCESS; + } +#endif + AssertIntEQ(argsCount, WS_SUCCESS); wolfSSH_free(ssh);