awx icon indicating copy to clipboard operation
awx copied to clipboard

Fix extremely flaky failure

Open AlanCoding opened this issue 1 month ago • 0 comments

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_characters by retrying random_title(non_ascii=True) multiple times before asserting an ASCII encode failure.

  • Tests:
    • In awxkit/test/test_utils.py, make test_random_titles_generates_correct_characters more robust by looping retries of utils.random_title(non_ascii=True) (up to 4 times) before expecting UnicodeEncodeError on ASCII encoding.

Written by Cursor Bugbot for commit d14e6f6d6346c16d82003e8694664f839020a9b6. This will update automatically on new commits. Configure here.

AlanCoding avatar Nov 04 '25 16:11 AlanCoding