Skip to content

Commit 8316e0a

Browse files
happyCoder92copybara-github
authored andcommitted
Make the starvation test less fragile by skipping stack trace
PiperOrigin-RevId: 811765965 Change-Id: If6b106a4d9e8540f4484e4fa5fdd77d83d542ffa
1 parent 86155ba commit 8316e0a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sandboxed_api/sandbox2/sandbox2_test.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,12 @@ TEST(StarvationTest, MonitorIsNotStarvedByTheSandboxee) {
273273
auto executor = std::make_unique<Executor>(path, args);
274274
executor->limits()->set_walltime_limit(absl::Seconds(5));
275275

276-
SAPI_ASSERT_OK_AND_ASSIGN(auto policy,
277-
CreateDefaultPermissiveTestPolicy(path).TryBuild());
276+
SAPI_ASSERT_OK_AND_ASSIGN(
277+
auto policy,
278+
CreateDefaultPermissiveTestPolicy(path)
279+
.CollectStacktracesOnTimeout(
280+
false) // collecting the stack trace might impact timing
281+
.TryBuild());
278282
Sandbox2 sandbox(std::move(executor), std::move(policy));
279283

280284
auto start = absl::Now();

0 commit comments

Comments
 (0)