awx
awx copied to clipboard
Fix extremely flaky failure
SUMMARY
From my data, 4 out of 10,000 test runs will fail with a "DID NOT RAISE" assertion, which is an unintended flaky fail.
While 0.04% is pretty low, we actually have several documented instances of this. So this should take care of it.
ISSUE TYPE
- Bug, Docs Fix or other nominal change
COMPONENT NAME
- API
[!NOTE] Reduces flakiness in
test_random_titles_generates_correct_charactersby retryingrandom_title(non_ascii=True)multiple times before asserting an ASCII encode failure.
- Tests:
- In
awxkit/test/test_utils.py, maketest_random_titles_generates_correct_charactersmore robust by looping retries ofutils.random_title(non_ascii=True)(up to 4 times) before expectingUnicodeEncodeErroron ASCII encoding.Written by Cursor Bugbot for commit d14e6f6d6346c16d82003e8694664f839020a9b6. This will update automatically on new commits. Configure here.