From f1426c6e9a268f22e8f4ccbdaf9f9793cacb9f2e Mon Sep 17 00:00:00 2001 From: Martin Chang Date: Wed, 23 Aug 2023 23:58:29 +0800 Subject: [PATCH] fix race condition when setting the secure flag during test (#1742) --- lib/tests/integration_test/client/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/integration_test/client/main.cc b/lib/tests/integration_test/client/main.cc index 722b56de..06fd7716 100644 --- a/lib/tests/integration_test/client/main.cc +++ b/lib/tests/integration_test/client/main.cc @@ -59,11 +59,11 @@ void doTest(const HttpClientPtr &client, std::shared_ptr TEST_CTX) auto &id = resp->getCookie("JSESSIONID"); REQUIRE(id); + haveCert = resp->peerCertificate() != nullptr; + sessionID = id; client->addCookie(id); waitCookie.set_value(1); - - haveCert = resp->peerCertificate() != nullptr; }); f.get(); CHECK(haveCert == client->secure());