From 080217393adcb353d05604505ac0dbfab6648786 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuchma Date: Thu, 31 Oct 2019 10:43:37 +0200 Subject: [PATCH] Fix a timeout in TaskContextTest.BlockingCancelIsWaiting test. Sometimes 0ms timeout is not enough, and test fails. Resolves: OLPEDGE-989 Signed-off-by: Mykhailo Kuchma --- olp-cpp-sdk-dataservice-read/tests/TaskContextTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olp-cpp-sdk-dataservice-read/tests/TaskContextTest.cpp b/olp-cpp-sdk-dataservice-read/tests/TaskContextTest.cpp index 3f6b5820f..682033561 100644 --- a/olp-cpp-sdk-dataservice-read/tests/TaskContextTest.cpp +++ b/olp-cpp-sdk-dataservice-read/tests/TaskContextTest.cpp @@ -173,7 +173,7 @@ TEST(TaskContextTest, BlockingCancelIsWaiting) { EXPECT_EQ(response_received, 1); EXPECT_FALSE(response.IsSuccessful()); - EXPECT_EQ(cancel_finished.wait_for(std::chrono::milliseconds(0)), + EXPECT_EQ(cancel_finished.wait_for(std::chrono::milliseconds(10)), std::future_status::ready); EXPECT_EQ(response.GetError().GetErrorCode(), ErrorCode::Cancelled); }