This is an automated email from the ASF dual-hosted git repository.
laiyingchun 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 3f3416315 [kudu-tool-test] more robust
TestRebuildTserverByLocalReplicaCopy
3f3416315 is described below
commit 3f34163156cfe47a9b4994dda38e5af4d2f5c0c1
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Jun 6 19:22:30 2022 -0700
[kudu-tool-test] more robust TestRebuildTserverByLocalReplicaCopy
I recently noticed that kudu-tool-test has been failing often [1].
It turned out that in most cases that's a timeout in the
TestRebuildTserverByLocalReplicaCopy scenario while waiting for 10000
rows to be written into the test table:
Expected: (workload.rows_inserted()) >= (10000), actual: 8350 vs 10000
src/kudu/util/test_util.cc:376: Failure
Failed
Timed out waiting for assertion to pass.
To address the flakiness, this patch adjusts the number of written rows
for TSAN builds to be 1000.
[1]
http://dist-test.cloudera.org:8080/test_drilldown?test_name=kudu-tool-test
Change-Id: Ic967f9d1eb732d2c735efc5b1d6edabbc275a3b7
Reviewed-on: http://gerrit.cloudera.org:8080/18592
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Mahesh Reddy <[email protected]>
Reviewed-by: Yingchun Lai <[email protected]>
---
src/kudu/tools/kudu-tool-test.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/kudu/tools/kudu-tool-test.cc b/src/kudu/tools/kudu-tool-test.cc
index ae6bd0a10..c77fe502d 100644
--- a/src/kudu/tools/kudu-tool-test.cc
+++ b/src/kudu/tools/kudu-tool-test.cc
@@ -6951,6 +6951,12 @@ static void CreateTableWithFlushedData(const string&
table_name,
KuduSchema schema;
ASSERT_OK(schema_builder.Build(&schema));
+
+#if defined(THREAD_SANITIZER)
+ constexpr auto kNumRows = 1000;
+#else
+ constexpr auto kNumRows = 10000;
+#endif
// Create a table and write some data to it.
TestWorkload workload(cluster);
workload.set_schema(schema);
@@ -6960,7 +6966,7 @@ static void CreateTableWithFlushedData(const string&
table_name,
workload.Setup();
workload.Start();
ASSERT_EVENTUALLY([&]() {
- ASSERT_GE(workload.rows_inserted(), 10000);
+ ASSERT_GE(workload.rows_inserted(), kNumRows);
});
workload.StopAndJoin();