From: Krzysztof Malysa Date: Wed, 4 Dec 2024 12:01:25 +0000 (+0100) Subject: cynara: fix tcag10_cancel_request test that sometimes failed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2078e5fa2bbd99866d9cbf9c84ef0ce4aa773f37;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git cynara: fix tcag10_cancel_request test that sometimes failed Change-Id: Iaf45697cd3d255fa1461d46cfec7686e5a8309d6 --- diff --git a/src/cynara-tests/test_cases_agent.cpp b/src/cynara-tests/test_cases_agent.cpp index dc3a6756..67c06c05 100644 --- a/src/cynara-tests/test_cases_agent.cpp +++ b/src/cynara-tests/test_cases_agent.cpp @@ -282,8 +282,12 @@ void tcag10_cancel_request_func() std::ref(agent), std::ref(agentRequest), std::ref(client), CYNARA_API_SUCCESS, Timeout::ExpectMode::TIMEOUT); agentRequest.assertCancel(); + // The above call to getAgentRequest() calls client.process() to send CancelRequest. However, + // the client.process() may or might not receive CancelResponse because server immediately + // responds with CancelResponse (does not wait for agent response). + // On the client side, we cannot determine whether the CancelResponse was already read or not + // because the response callback is called immediately by client.cancel(). agent.putResponse(AgentResponse::createCancel(id)); - client.process(CYNARA_API_SUCCESS, Client::TimeoutExpectation::EXPECT_NO_TIMEOUT, 2); } void tcag11_cancel_processed_request_func()