bito-code-review[bot] commented on PR #42464:
URL: https://github.com/apache/superset/pull/42464#issuecomment-5102899323
<!-- Bito Reply -->
The flagged issue is correct. The test helper
`run_with_sampling_read_limit_retry` in the unit tests currently propagates the
retry exception instead of raising the original exception as the production
code does. This prevents tests from verifying that the original read-limit
error is preserved when the retry fails.
To resolve this, update the test helper to catch the retry exception and
raise the original exception using `raise ex from retry_ex`, mirroring the
production implementation in `Database.run_with_sampling_read_limit_retry`.
**tests/unit_tests/datasets/test_datetime_format_detector.py**
```
try:
return run(sql)
except Exception as retry_ex:
# Simulate production: surface the original read-limit error
raise ex from retry_ex
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]