You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Jaydeep Vishwakarma (JIRA)" <ji...@apache.org> on 2014/11/25 10:29:12 UTC

[jira] [Commented] (OOZIE-2044) ssh action succeed with a not exists command which should be fail.

    [ https://issues.apache.org/jira/browse/OOZIE-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224283#comment-14224283 ] 

Jaydeep Vishwakarma commented on OOZIE-2044:
--------------------------------------------

Can you have two different test cases for following code . Seems like this test case can switch to any assert. Ideally there should be one sure flow for test case.
{code}
+            switch (ex.getErrorType()) {
+            case TRANSIENT:
+                assertEquals("COULD_NOT_CONNECT", ex.getErrorCode());
+                break;
+            case ERROR:
+                assertEquals("UNKOWN_ERROR", ex.getErrorCode());
+                break;
+            default:
+                fail("errorType not TRANSIENT or ERROR");
+            }
{code}

> ssh action succeed with a not exists command which should be fail.
> ------------------------------------------------------------------
>
>                 Key: OOZIE-2044
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2044
>             Project: Oozie
>          Issue Type: Bug
>          Components: action, core
>    Affects Versions: trunk
>            Reporter: PENG Yongyi
>         Attachments: OOZIE-2044.patch
>
>
> it's should fail but succeed as follow action:
> <ssh>
>   <host>localhost</host>
>   <command>/bin/not-exists-command</command>
> </ssh>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)