[
https://issues.apache.org/jira/browse/HDFS-6194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13964464#comment-13964464
]
Haohui Mai commented on HDFS-6194:
----------------------------------
{code}
+ @VisibleForTesting
+ protected ByteRangeInputStream(URLOpener o, URLOpener r, boolean connect)
+ throws IOException {
+ this.originalURL = o;
+ this.resolvedURL = r;
+ if (connect) {
+ getInputStream();
+ }
+ }
+
{code}
Please remove it. See the discussion in HDFS-6143 for more details.
For {{MockByteRangeInputStream}} and {{MockHttpURLConnection}}, please write
them with Mockito directly. The code should not need to use the {{spy()}} call
at all.
> Create new tests for {{ByteRangeInputStream}}
> ---------------------------------------------
>
> Key: HDFS-6194
> URL: https://issues.apache.org/jira/browse/HDFS-6194
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Haohui Mai
> Assignee: Akira AJISAKA
> Attachments: HDFS-6194.patch
>
>
> HDFS-5570 removes old tests for {{ByteRangeInputStream}}, because the tests
> only are tightly coupled with hftp / hsftp. New tests need to be written
> because the same class is also used by {{WebHdfsFileSystem}}.
--
This message was sent by Atlassian JIRA
(v6.2#6252)