Skip to content

Commit

Permalink
Merge pull request #31600 from vespa-engine/toregge/read-cgroup-mock-…
Browse files Browse the repository at this point in the history
…data-from-source-directory

Read cgroup mock data from source directory.
  • Loading branch information
toregge authored Jun 18, 2024
2 parents 3b7a697 + b2b2652 commit 6bbdc6c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include <vespa/vespalib/gtest/gtest.h>
#include <vespa/vespalib/testkit/test_path.h>
#include <vespa/vespalib/util/cgroup_resource_limits.h>
#include <vespa/vespalib/util/size_literals.h>

Expand All @@ -20,7 +21,8 @@ CGroupResourceLimitsTest::~CGroupResourceLimitsTest() = default;
void
CGroupResourceLimitsTest::check_limits(const std::string &base, const std::optional<uint64_t>& memory_limit, const std::optional<uint32_t>& cpu_limit)
{
CGroupResourceLimits cg_limits(base + "/cgroup", base + "/self");
auto src_base = TEST_PATH(base);
CGroupResourceLimits cg_limits(src_base + "/cgroup", src_base + "/self");
EXPECT_EQ(memory_limit, cg_limits.get_memory_limit());
EXPECT_EQ(cpu_limit, cg_limits.get_cpu_limit());
}
Expand Down

0 comments on commit 6bbdc6c

Please sign in to comment.