This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push: new e5f3d2b19 KUDU-3433 Fix flakiness in ClientTest.TestDeleteWithDeletedTableReserveSecondsWorks e5f3d2b19 is described below commit e5f3d2b19e7a210f64e76584fbe53454886668cb Author: kedeng <kdeng...@gmail.com> AuthorDate: Tue Apr 9 16:57:57 2024 +0800 KUDU-3433 Fix flakiness in ClientTest.TestDeleteWithDeletedTableReserveSecondsWorks The reason for the flakiness of the unit test is that we did not consider corner cases, namely, the time reserved from detecting a table in soft-deleted state until the execution of deletion, during which some operations may occur. We need to reserve more time. However, in order to verify that FLAGS_table_reserve_seconds is indeed effective, the additional time cannot be too long. Taking these two factors into consideration, I added one second of waiting time and performed multiple tests locally using the gtest_repeat parameter to ensure that this modification is effective. Change-Id: Iab3a6a5f54701470e368c043133f4646aa71126d Reviewed-on: http://gerrit.cloudera.org:8080/21268 Tested-by: Alexey Serbin <ale...@apache.org> Reviewed-by: Alexey Serbin <ale...@apache.org> --- src/kudu/client/client-test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kudu/client/client-test.cc b/src/kudu/client/client-test.cc index 1078c6884..c3b46baa5 100644 --- a/src/kudu/client/client-test.cc +++ b/src/kudu/client/client-test.cc @@ -5710,7 +5710,8 @@ TEST_F(ClientTest, TestDeleteWithDeletedTableReserveSecondsWorks) { ASSERT_TRUE(tables.empty()); // Test FLAGS_table_reserve_seconds. - SleepFor(MonoDelta::FromMilliseconds(5 * 1000)); + // We allow a bit more time than reserved to avoid corner cases. + SleepFor(MonoDelta::FromMilliseconds(6 * 1000)); // No tables left. ASSERT_OK(client_->ListTables(&tables));