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 c146454 [tests] make DisableWriteWhenExceedingQuotaTest more stable
c146454 is described below
commit c146454dfa6a840b79a33f16bc2df6a3b6c93600
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Jan 13 21:11:47 2022 -0800
[tests] make DisableWriteWhenExceedingQuotaTest more stable
I noticed that the TestDisableWritePrivilegeWhenExceedingSizeQuota
scenario of from DisableWriteWhenExceedingQuotaTest test failed when
running pre-commit checks [1] for one code review item [2] with the
error output below:
src/kudu/integration-tests/write_limit-itest.cc:229: Failure
Value of: s.IsIOError()
Actual: false
Expected: true
OK
src/kudu/integration-tests/write_limit-itest.cc:423: Failure
Expected: TestSizeLimit() doesn't generate new fatal failures in the
current thread.
Actual: it does.
I took a look at the scenario and modified the disk size limit a bit,
adding an extra comment for the disk size limit.
Running the modified test didn't show any signs of flakiness [3].
[1]
http://dist-test.cloudera.org/job?job_id=jenkins-slave.1642105466.1969358
[2] https://gerrit.cloudera.org/#/c/18147/
[3] http://dist-test.cloudera.org/job?job_id=aserbin.1642137803.81044
Change-Id: I58530d4b79da43d17b504b09abb3741fa16a936f
Reviewed-on: http://gerrit.cloudera.org:8080/18149
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Andrew Wong <[email protected]>
---
src/kudu/integration-tests/write_limit-itest.cc | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/kudu/integration-tests/write_limit-itest.cc
b/src/kudu/integration-tests/write_limit-itest.cc
index b46a868..69f9a6f 100644
--- a/src/kudu/integration-tests/write_limit-itest.cc
+++ b/src/kudu/integration-tests/write_limit-itest.cc
@@ -221,7 +221,7 @@ class DisableWriteWhenExceedingQuotaTest : public KuduTest {
ASSERT_OK(InsertKeyToTable(client_table_.get(), good_session.get(), k));
s = good_session->Flush();
if (!s.ok()) {
- // break the loop once the write is blocked
+ // break the loop once the write failed
break;
}
WaitForTServerUpdatesStatisticsToMaster(1000);
@@ -328,7 +328,7 @@ class DisableWriteWhenExceedingQuotaTest : public KuduTest {
}
// change the table limit through admin user
- void ModifyLimit(const int64_t disk_size_limit, const int64_t
row_count_limit) {
+ void ModifyLimit(int64_t disk_size_limit, int64_t row_count_limit) {
ASSERT_OK(SetupClient(kSuperUser));
ASSERT_OK(SetTableLimit(kTableName, client_, disk_size_limit,
row_count_limit));
}
@@ -414,10 +414,16 @@ TEST_F(DisableWriteWhenExceedingQuotaTest,
TestDisableWritePrivilegeWhenExceedin
NO_FATALS(TestRowLimit());
}
-// Verify the table's disk size limit
+// Verify the table's disk size limit.
TEST_F(DisableWriteWhenExceedingQuotaTest,
TestDisableWritePrivilegeWhenExceedingSizeQuota) {
- // modify the table limit to allow more rows but small size
- NO_FATALS(ModifyLimit(1024L * 1024 + 120L * 1024, kRowCountLimit));
+ // Modify the limits for the table size: allow all the test rows to be
+ // inserted but set a restrictive limit on the size of the table's data on
+ // disk. The latter limit is to be hit while inserting the test rows. The
+ // limit is tuned to allow for at least one row to be inserted after all the
+ // flush, compaction, and GC jazz performed in the context of
TestSizeLimit(),
+ // taking into account all the auxiliary data kept on disk by corresponding
+ // tablet servers.
+ NO_FATALS(ModifyLimit(1024 * (1024 + 110), kRowCountLimit));
// refresh the client
ASSERT_OK(SetupClient(kUser));
NO_FATALS(TestSizeLimit());