Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4555

TestDefaultContainerExecutor#testContainerLaunchError fails on non-english locale environment

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.9.0, 3.0.0-alpha2
    • nodemanager, test
    • None
    • Reviewed

    Description

      In my env where LANG=ja_JP.UTF-8, the test fails with

      -------------------------------------------------------------------------------
      Test set: org.apache.hadoop.yarn.server.nodemanager.TestDefaultContainerExecutor
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.286 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.nodemanager.TestDefaultContainerExecutor
      testContainerLaunchError(org.apache.hadoop.yarn.server.nodemanager.TestDefaultContainerExecutor)  Time elapsed: 1.149 sec  <<< FAILURE!
      java.lang.AssertionError: Invalid Diagnostics message: Exception from container-launch.
      Container id: CONTAINER_ID
      Exit code: 127
      Exception message: bash: target/TestDefaultContainerExecutor/localDir/default_container_executor.sh: そのようなファイルやディレクトリはありません
      
      Stack trace: ExitCodeException exitCode=127: bash: target/TestDefaultContainerExecutor/localDir/default_container_executor.sh: そのようなファイルやディ>レクトリはありません
      

      This is because the test code assertion assumes the English locale as below.

      250           public Object answer(InvocationOnMock invocationOnMock)
      251               throws Throwable {
      252             String diagnostics = (String) invocationOnMock.getArguments()[0];
      253             assertTrue("Invalid Diagnostics message: " + diagnostics,
      254                 diagnostics.contains("No such file or directory"));
      255             return null;
      256           }
      

      This exists on trunk, too.

      Attachments

        1. YARN-4555.1.patch
          1 kB
          Takashi Ohnishi

        Activity

          People

            bwtakacy Takashi Ohnishi
            bwtakacy Takashi Ohnishi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: