Skip to content

Commit

Permalink
Temporarily fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmg-stripe committed Jan 9, 2025
1 parent 071afaa commit 07d6e9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,7 @@ public void checkHeartBeats(Instant currentTime) {
}
} else {
// no heartbeat in a timely manner since launched or heartbeat too old
// note: the worker has been launched
boolean noTimelyHeartbeatSinceLaunched = !workerMeta.getLastHeartbeatAt().isPresent()
&& Duration.between(Instant.ofEpochSecond(workerMeta.getLaunchedAt()), currentTime).getSeconds() > missedHeartBeatToleranceSecs;
boolean heartbeatTooOld = workerMeta.getLastHeartbeatAt().isPresent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,9 @@ public void testNoHeartBeatAfterLaunchResubmit() {
assertEquals(JobState.Accepted, resp4.getJobMetadata().get().getState());

// 1 original submissions and 0 resubmits because of worker not in launched state with HB timeouts
verify(schedulerMock, times(2)).scheduleWorkers(any());
verify(schedulerMock, times(1)).scheduleWorkers(any());
// 1 kills due to resubmits
verify(schedulerMock, times(1)).unscheduleAndTerminateWorker(eq(workerId2), any());
verify(schedulerMock, times(0)).unscheduleAndTerminateWorker(eq(workerId2), any());
} catch (Exception e) {
fail("unexpected exception " + e.getMessage());
}
Expand Down

0 comments on commit 07d6e9a

Please sign in to comment.