shahar1 commented on PR #65982:
URL: https://github.com/apache/airflow/pull/65982#issuecomment-4345047460
> Thanks @shahar1, made the change.
>
> Added an env-var gate at module level in
`example_dataproc_cancel_on_kill.py`:
>
> ```python
> if not os.environ.get("RUN_MANUAL_DATAPROC_CANCEL_ON_KILL_TEST"):
> pytest.skip("Manual-only system test: set
RUN_MANUAL_DATAPROC_CANCEL_ON_KILL_TEST=1 to run.", allow_module_level=True)
> ```
>
> How this works: by default the test is skipped at collection time, so
automated runs (which don't set the env var) won't pick it up. To run manually,
set `RUN_MANUAL_DATAPROC_CANCEL_ON_KILL_TEST=1`. Same `pytest.skip(...,
allow_module_level=True)` pattern already used for "service not available"
gates in `example_bigquery_to_mysql.py` etc.
>
> Verified locally with `pytest --collect-only --system`:
>
> * without the env var: `0 tests collected` (SKIPPED with the explanation
message)
> * with `RUN_MANUAL_DATAPROC_CANCEL_ON_KILL_TEST=1`: `1 test collected`
Nice idea, but currently seems incompatible with other tests, as they fail -
try to figure out how to work around that.
--
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]