Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18714

Wrong StringUtils.join() called in AbstractContractRootDirectoryTest

    XMLWordPrintableJSON

Details

    Description

      In the following call to StringUtils.join(), "\n" is treated as an element, not as a separator:

      Expected output:

      [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.711 s <<< FAILURE! - in org.apache.hadoop.fs.contract.hdfs.TestHDFSContractRootDirectory
      [ERROR] testListEmptyRootDirectory(org.apache.hadoop.fs.contract.hdfs.TestHDFSContractRootDirectory)  Time elapsed: 0.011 s  <<< FAILURE!
      java.lang.AssertionError: listStatus on empty root-directory returned found: HdfsLocatedFileStatus{path=hdfs://localhost:37225/test; isDirectory=true; ...} expected:<0> but was:<1>
      	at org.junit.Assert.fail(Assert.java:89)
      	at org.junit.Assert.failNotEquals(Assert.java:835)
      	at org.junit.Assert.assertEquals(Assert.java:647)
      	at org.apache.hadoop.fs.contract.AbstractContractRootDirectoryTest.testListEmptyRootDirectory(AbstractContractRootDirectoryTest.java:199)
      

      Actual output:

      [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.708 s <<< FAILURE! - in org.apache.hadoop.fs.contract.hdfs.TestHDFSContractRootDirectory
      [ERROR] testListEmptyRootDirectory(org.apache.hadoop.fs.contract.hdfs.TestHDFSContractRootDirectory)  Time elapsed: 0.011 s  <<< FAILURE!
      java.lang.AssertionError: 
      listStatus on empty root-directory returned found: 
      [Lorg.apache.hadoop.fs.FileStatus;@73344c46 expected:<0> but was:<1>
      	at org.junit.Assert.fail(Assert.java:89)
      	at org.junit.Assert.failNotEquals(Assert.java:835)
      	at org.junit.Assert.assertEquals(Assert.java:647)
      	at org.apache.hadoop.fs.contract.AbstractContractRootDirectoryTest.testListEmptyRootDirectory(AbstractContractRootDirectoryTest.java:199)
      

      Attachments

        Activity

          People

            adoroszlai Attila Doroszlai
            adoroszlai Attila Doroszlai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: