<commit_before>***Settings***
Library  ExampleLibrary
Library  FailUntilSucceeds  3

***Variables***
${HELLO}  Used to test that variable name, not value, is shown in arguments


***Test Cases***

Fail Because Timeout exceeded
    [Documentation]  FAIL  Timeout 1 second 100 milliseconds exceeded. The last error was: Still 0 times to fail!
    Wait Until Keyword Succeeds  1.1 seconds  1 s 1 ms  Fail Until Retried Often Enough

Pass with first Try
    Wait Until Keyword Succeeds  2 minutes  30 seconds  Log  ${HELLO}

Pass With Some Medium Try
    Wait Until Keyword Succeeds  ${42}  200 milliseconds  Fail Until Retried Often Enough

Pass With Last Possible Try
    Wait Until Keyword Succeeds  1.1 seconds  0.3 seconds  Fail Until Retried Often Enough

Pass With Returning Value Correctly
    ${return value} =  Wait Until Keyword Succeeds  4 seconds  0 min 0 sec 1 ms  Fail Until Retried Often Enough  ${HELLO}
    Should Be Equal  ${return value}  ${HELLO}  Returned value should be the one that is given to the keyword.

Invalid Timeout Does Not Cause Uncatchable Failure
    Run Keyword And Expect Error  ValueError: Invalid time string 'Not Time Value'
    ...  Wait Until Keyword Succeeds  Not Time Value  1 seconds  No Operation

Invalid Retry Interval Does Not Cause Uncatchable Failure
    Run Keyword And Expect Error  ValueError: Invalid time string 'invalid'
    ...  Wait Until Keyword Succeeds  1 seconds  invalid  No Operation

Wait Until In User Keyword
    Wait Until Inside User Keyword  

Failing User Keyword with Wait Until
    [Documentation]  FAIL  Timeout 200 milliseconds exceeded. The last error was: Still 0 times to fail!
    Wait Until Keyword Succeeds  ${0.2}  0.1  User Keyword

Passing User Keyword with Wait Until
    ${return value} =  Wait Until Keyword Succeeds  10 minutes  10 milliseconds  User Keyword
    Should Be Equal  ${return value}  From User Keyword  Returned value should be the one defined in user keyword.

Wait Until With Longer Test Timeout
    [Timeout]  10 seconds<commit_msg>fix flickering<commit_after>***Settings***
Library  ExampleLibrary
Library  FailUntilSucceeds  3

***Variables***
${HELLO}  Used to test that variable name, not value, is shown in arguments


***Test Cases***

Fail Because Timeout exceeded
    [Documentation]  FAIL  Timeout 1 second 100 milliseconds exceeded. The last error was: Still 0 times to fail!
    Wait Until Keyword Succeeds  1.1 seconds  1 s 1 ms  Fail Until Retried Often Enough

Pass with first Try
    Wait Until Keyword Succeeds  2 minutes  30 seconds  Log  ${HELLO}

Pass With Some Medium Try
    Wait Until Keyword Succeeds  ${42}  200 milliseconds  Fail Until Retried Often Enough

Pass With Last Possible Try
    Wait Until Keyword Succeeds  1.1 seconds  0.3 seconds  Fail Until Retried Often Enough

Pass With Returning Value Correctly
    ${return value} =  Wait Until Keyword Succeeds  4 seconds  0 min 0 sec 1 ms  Fail Until Retried Often Enough  ${HELLO}
    Should Be Equal  ${return value}  ${HELLO}  Returned value should be the one that is given to the keyword.

Invalid Timeout Does Not Cause Uncatchable Failure
    Run Keyword And Expect Error  ValueError: Invalid time string 'Not Time Value'
    ...  Wait Until Keyword Succeeds  Not Time Value  1 seconds  No Operation

Invalid Retry Interval Does Not Cause Uncatchable Failure
    Run Keyword And Expect Error  ValueError: Invalid time string 'invalid'
    ...  Wait Until Keyword Succeeds  1 seconds  invalid  No Operation

Wait Until In User Keyword
    Wait Until Inside User Keyword  

Failing User Keyword with Wait Until
    [Documentation]  FAIL  Timeout 200 milliseconds exceeded. The last error was: Still 0 times to fail!
    Wait Until Keyword Succeeds  ${0.2}  0.11  User Keyword

Passing User Keyword with Wait Until
    ${return value} =  Wait Until Keyword Succeeds  10 minutes  10 milliseconds  User Keyword
    Should Be Equal  ${return value}  From User Keyword  Returned value should be the one defined in user keyword.

Wait Until With Longer Test Timeout
    [Timeout]  10 seconds
{'fraction_non_alphanumeric': 0.04223968565815324, 'fraction_numerical': 0.02087426326129666, 'mean_word_length': 3.5867117117117115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404728', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1126, 'n_words': 582}