No public description PiperOrigin-RevId: 902904124
diff --git a/centipede/centipede_callbacks.cc b/centipede/centipede_callbacks.cc index 43ad89a..8480087 100644 --- a/centipede/centipede_callbacks.cc +++ b/centipede/centipede_callbacks.cc
@@ -455,8 +455,11 @@ 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()) {