[
https://issues.apache.org/jira/browse/ACCUMULO-2299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13890772#comment-13890772
]
Josh Elser commented on ACCUMULO-2299:
--------------------------------------
bq. I didn't use expected parameter because the test class was inheriting
TestCase instead of using @Test. But I can change the class to use @Test unless
anyone has objections.
Please do. Anything still extending TestCase is just hold over from old days.
There shouldn't be any reason that I'm aware of that we would still want to
extend TestCase.
bq. To be clear, you are asking about testing the new "readField" method in
isolation with the truncated byte array, right?
Yes. My thought was to create some Keys and Values, and serialize them into a
single Value using {{encodeRow}}. Truncate the byte array from that Value, and
pass it back to {{decodeRow}} and expect the exception that should be thrown
from {{readField}}
> WholeRowIterator.decodeRow should check input stream return val
> ---------------------------------------------------------------
>
> Key: ACCUMULO-2299
> URL: https://issues.apache.org/jira/browse/ACCUMULO-2299
> Project: Accumulo
> Issue Type: Improvement
> Affects Versions: 1.4.4, 1.5.0
> Reporter: Josh Elser
> Assignee: Vikram Srivastava
> Priority: Minor
> Labels: newbie
> Fix For: 1.5.1
>
> Attachments: ACCUMULO-2299.v1.patch.txt, ACCUMULO-2299.v2.patch.txt
>
>
> The decodeRow method ignores the return code on the DataInputStream.read
> calls. If that return value is inspected, we can catch errors where the data
> is malformed.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)