Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8758811E58 for ; Thu, 18 Sep 2014 22:20:34 +0000 (UTC) Received: (qmail 4590 invoked by uid 500); 18 Sep 2014 22:20:34 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 4538 invoked by uid 500); 18 Sep 2014 22:20:34 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 4522 invoked by uid 99); 18 Sep 2014 22:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2014 22:20:34 +0000 Date: Thu, 18 Sep 2014 22:20:34 +0000 (UTC) From: "Eric Payne (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7049) TestByteRangeInputStream.testPropagatedClose fails and throw NPE on branch-2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139613#comment-14139613 ] Eric Payne commented on HDFS-7049: ---------------------------------- Hi [~jyu@cloudera.com]. Thanks for merging this fix and creating the patch. The patch doesn't apply because it has the 'a/' and 'b/' at the beginning of the filepaths. I downloaded the patch, removed those strings from the filepaths, and I was able to apply the patch cleanly to branch-2. The test also passes cleanly with no NPE. Once you make that change to the patch, it looks good to me. > TestByteRangeInputStream.testPropagatedClose fails and throw NPE on branch-2 > ---------------------------------------------------------------------------- > > Key: HDFS-7049 > URL: https://issues.apache.org/jira/browse/HDFS-7049 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Juan Yu > Assignee: Juan Yu > Priority: Minor > Attachments: HDFS-7049-branch-2.patch > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)