You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2022/04/06 19:05:58 UTC

[kudu] branch master updated: [UT] Fix env-test resource limit overflow

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 ed04c8b6f [UT] Fix env-test resource limit overflow
ed04c8b6f is described below

commit ed04c8b6f70c6dd5b63cc517e33fb8e52c1c3ce9
Author: Yingchun Lai <ac...@gmail.com>
AuthorDate: Wed Apr 6 23:59:57 2022 +0800

    [UT] Fix env-test resource limit overflow
    
    Fix the test failure as following:
    [ RUN      ] ResourceLimitTypes/ResourceLimitTypeTest.TestIncreaseLimit/1
    I0406 23:56:52.783593 1668634 env_posix.cc:2174] Raising this process' running threads per effective uid limit from 4096 to 18446744073709551615
    .../kudu/src/kudu/util/env-test.cc:690: Failure
    Expected: (limit_after) >= (limit_before), actual: -1 vs 4096
    I0406 23:56:52.784036 1668634 test_util.cc:164] -----------------------------------------------
    I0406 23:56:52.784056 1668634 test_util.cc:165] Had fatal failures, leaving test files at .../env-test.ResourceLimitTypes_ResourceLimitTypeTest.TestIncreaseLimit_1.1649260612778581-1668634-0
    [  FAILED  ] ResourceLimitTypes/ResourceLimitTypeTest.TestIncreaseLimit/1, where GetParam() = running threads per effective uid (2 ms)
    
    Change-Id: Ic919722ca0f7eab00baf8e7514b1c1bd1e1b86e9
    Reviewed-on: http://gerrit.cloudera.org:8080/18388
    Tested-by: Alexey Serbin <al...@apache.org>
    Reviewed-by: Alexey Serbin <al...@apache.org>
---
 src/kudu/util/env-test.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/kudu/util/env-test.cc b/src/kudu/util/env-test.cc
index f3e23439e..cec87dc9f 100644
--- a/src/kudu/util/env-test.cc
+++ b/src/kudu/util/env-test.cc
@@ -684,14 +684,14 @@ INSTANTIATE_TEST_SUITE_P(ResourceLimitTypes,
 TEST_P(ResourceLimitTypeTest, TestIncreaseLimit) {
   // Increase the resource limit. It should either increase or remain the same.
   Env::ResourceLimitType t = GetParam();
-  int64_t limit_before = env_->GetResourceLimit(t);
+  uint64_t limit_before = env_->GetResourceLimit(t);
   env_->IncreaseResourceLimit(t);
-  int64_t limit_after = env_->GetResourceLimit(t);
+  uint64_t limit_after = env_->GetResourceLimit(t);
   ASSERT_GE(limit_after, limit_before);
 
   // Try again. It should definitely be the same now.
   env_->IncreaseResourceLimit(t);
-  int64_t limit_after_again = env_->GetResourceLimit(t);
+  uint64_t limit_after_again = env_->GetResourceLimit(t);
   ASSERT_EQ(limit_after, limit_after_again);
 }