ColtenOuO commented on code in PR #70141:
URL: https://github.com/apache/airflow/pull/70141#discussion_r3621341998
##########
go-sdk/pkg/worker/runner_test.go:
##########
@@ -252,6 +252,27 @@ func (s *WorkerSuite) TestTaskHeartbeatConflictStopsTask()
{
s.NoError(err)
}
+func (s *WorkerSuite) TestTaskHeartbeatNilResponseDoesNotPanic() {
+ id := uuid.New().String()
+ testWorkload := newTestWorkLoad(id, id[:8])
+
+ s.registry.AddDag(testWorkload.TI.DagId).
+ AddTaskWithName(testWorkload.TI.TaskId, func() error {
+ time.Sleep(250 * time.Millisecond)
Review Comment:
Good point, updated — now waits on a channel closed by the mocked
`Heartbeat`'s second call instead of sleeping. Also verified it still catches
the regression (crashes on the first call) when reverted against the unfixed
code.
Thanks for your review ><
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]