Jose Luis López created YARN-12006:
--------------------------------------

             Summary: TestRouterWebServicesREST.getAppAttempt fails with 
IndexOutOfBoundsException before the RM creates the first attempt
                 Key: YARN-12006
                 URL: https://issues.apache.org/jira/browse/YARN-12006
             Project: Hadoop YARN
          Issue Type: Bug
          Components: router, test
            Reporter: Jose Luis López


{{TestRouterWebServicesREST}} (and {{TestFederationWebApp}}, which extends it) 
fails intermittently in {{testGetAppAttemptXML}} and {{testGetContainersXML}} 
with:

{noformat}
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at ...TestRouterWebServicesREST.getAppAttempt(...)
{noformat}

{{getAppAttempt}} queries the RM for the application's attempts right after 
{{submitApplication()}} returns and reads {{getAttempts().get(0)}}. The RM 
creates the first attempt asynchronously after accepting the submission, so the 
list can still be empty at that point.

h3. Proposed fix (test-only)
* Make {{getAppAttempt}} wait, up to 10s, for the first attempt to appear 
({{LambdaTestUtils.eventually}}).
* Raise the timeout of {{testGetAppAttemptXML}} and {{testGetContainersXML}} 
from 2s to 30s, since they now wait.
* Close the Jersey client that {{getAppAttempt}} creates. It currently leaks.

The Router-vs-RM comparison races in the same class ({{testAppXML}}, 
{{testAppStateXML}}, {{testAppAttemptXML}}, {{testGetContainersXML}}) are 
tracked separately in YARN-12004.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to