hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-15117) open(PathHandle) contract test should be exhaustive for default options
Date Thu, 28 Dec 2017 23:13:00 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-15117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Douglas updated HADOOP-15117:
-----------------------------------
    Attachment: HADOOP-15117.001.patch

Thanks for taking a look, [~elgoiri].

bq. Should we make sure we trigger the exception? For example, should testMoved have a fail()
after the verifyRead() that expects exceptions?
Instead of the try/fail, catch/ignore pattern this checks the option to determine if the exception
should have been thrown (and vice versa). The {{verifyRead}} ensures the referent is correct
with the expected content.

bq. We do the serialization of the PathHandle a bunch of times in the tests, I'm not sure
we should add it to the handle itself but wrapping it in a function may make sense.
Good point. Changed whether the handle is first serialized to be another parameter for the
tests. Either {{Paramaterized}} has a bug, or I'm using the naming incorrectly, because including
this parameter in the name causes odd test failures. As-is, it's enough for someone to figure
out what's going wrong.

bq. Similarly to what you do in testChangedAndMoved(), you could split (with extra lines),
the part that does the changes/moves from the ones that do the checks.
Done

bq. Does it make sense to fail() in the unreachable statement case for getHandleOrSkip()
Unfortunately the return statement is still required. It really is unreachable if {{skip}}
does what it's supposed to do.

> open(PathHandle) contract test should be exhaustive for default options
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-15117
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15117
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>         Attachments: HADOOP-15117.000.patch, HADOOP-15117.001.patch
>
>
> The current {{AbstractContractOpenTest}} covers many, but not all of the permutations
of the default {{HandleOpt}}. It could also be refactored to be clearer as documentation



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message