From 9b5edfe304bd097e206bc888d7ed4f5dd270f390 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Mon, 20 Apr 2026 17:36:13 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 902904124 --- centipede/centipede_callbacks.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/centipede/centipede_callbacks.cc b/centipede/centipede_callbacks.cc index 43ad89a6..84800876 100644 --- a/centipede/centipede_callbacks.cc +++ b/centipede/centipede_callbacks.cc @@ -455,8 +455,11 @@ int CentipedeCallbacks::RunBatchForBinary(std::string_view binary) { env_.timeout_per_batch == 0 ? absl::InfiniteDuration() : absl::Seconds(env_.timeout_per_batch) + absl::Seconds(5); - const auto deadline = - std::min(absl::Now() + amortized_timeout, GetStopTime()); + const auto deadline = std::min( + absl::Now() + amortized_timeout, + GetStopTime() + + // Add a buffer to the deadline for the batch to finish normally. + env_.runner_cleanup_timeout); int exit_code = EXIT_SUCCESS; const bool should_clean_up = [&] { if (!cmd.is_executing()) {