amoghrajesh commented on code in PR #77762:
URL: https://github.com/apache/airflow/pull/77762#discussion_r4747975276
##########
.github/instructions/code-review.instructions.md:
##########
@@ -40,6 +40,7 @@ Use these rules when reviewing pull requests to the Apache
Airflow repository.
- **Flag any `unittest.TestCase` subclass.** Use pytest patterns instead.
- **Flag any `mock.Mock()` or `mock.MagicMock()` without `spec` or
`autospec`.** Unspec'd mocks silently accept any attribute access, hiding real
bugs.
- **Flag any `time.sleep` or `datetime.now()` in tests.** Use `time_machine`
for time-dependent tests.
+- **Flag elapsed-time assertions and `threading.Timer` in tests.** Checks like
`time.monotonic() - start < 1` and threads released by timers flake on loaded
CI runners. Use `threading.Event` and assert order instead. Also flag global
`time.*` patches such as `mock.patch("time.monotonic")`; patch the name in the
module under test.
Review Comment:
Sure. Handled.
--
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]