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

TestByteRangeInputStream.testPropagatedClose fails and throw NPE on branch-2

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0
    • test
    • None
    • Reviewed

    Description

      On branch-2, TestByteRangeInputStream.testPropagatedClose throw NPE when HftpFileSystem$RangeHeaderUrlOpener.connect
      This is due to fix of HDFS-6143 "WebHdfsFileSystem open should throw FileNotFoundException for non-existing paths"
      public ByteRangeInputStream(URLOpener o, URLOpener r) throws IOException

      { this.originalURL = o; this.resolvedURL = r; getInputStream(); }

      the getInputStream() will be called in constructor now to verify if file exists.
      Since we just try to test if ByteRangeInputStream#close is called at proper time, we could mock(ByteRangeInputStream.class, CALLS_REAL_METHODS) for testing to avoid the NPE issue.
      I believe the trunk version already does this, we just need to merge the test from trunk.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jyu@cloudera.com Juan Yu Assign to me
            jyu@cloudera.com Juan Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment