ephraimbuddy commented on pull request #17581: URL: https://github.com/apache/airflow/pull/17581#issuecomment-900167012
> There are several > > ```python > # This should not happen. > time.sleep(10) > ``` > > usages in the tests. I wonder if we should add an `assert False, "This should not happen"` at their end to make the test fail explicitly. Here, we want to sleep a bit so that the heartbeat would detect the state change. If it fails to detect the state change within the time, then the code beneath would run, which would mean the test has failed because `task_terminated_externally.value` will then be 0. Unless we want to remove `task_terminated_externally.value` from the tests, we can just sleep 10s and assert False. What do you think? -- 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]
