Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13557

TestDFSAdmin#testListOpenFiles fails on Windows

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0, 3.2.0, 3.1.1, 2.9.2, 3.0.3
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      Different from Unix-like system, Windows usesĀ \r\n to signify an enter is pressed.

      [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 91.891 s <<< FAILURE! - in org.apache.hadoop.hdfs.tools.TestDFSAdmin
      [ERROR] testListOpenFiles(org.apache.hadoop.hdfs.tools.TestDFSAdmin) Time elapsed: 91.752 s <<< FAILURE!
      java.lang.AssertionError:

      Expected: is a string containing "/tmp/files/open-file-14\n"
      but: was "Formatting using clusterid: testClusterID
      Client Host Client Name Open File Path
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-0
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-1
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-2
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-3
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-4
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-5
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-6
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-7
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-8
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-9
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-10
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-11
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-12
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-13
      127.0.0.1 DFSClient_NONMAPREDUCE_-1619541836_214 /tmp/files/open-file-14
      "
      at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      at org.junit.Assert.assertThat(Assert.java:865)
      at org.junit.Assert.assertThat(Assert.java:832)
      at org.apache.hadoop.hdfs.tools.TestDFSAdmin.verifyOpenFilesListing(TestDFSAdmin.java:664)
      at org.apache.hadoop.hdfs.tools.TestDFSAdmin.testListOpenFiles(TestDFSAdmin.java:644)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

        Attachments

        1. HDFS-13557-branch-2.001.patch
          1 kB
          Anbang Hu
        2. HDFS-13557-branch-2.000.patch
          1 kB
          Anbang Hu
        3. HDFS-13557.002.patch
          1 kB
          Anbang Hu
        4. HDFS-13557.001.patch
          1 kB
          Anbang Hu
        5. HDFS-13557.000.patch
          1 kB
          Anbang Hu

          Issue Links

            Activity

              People

              • Assignee:
                huanbang1993 Anbang Hu
                Reporter:
                huanbang1993 Anbang Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: