[
https://issues.apache.org/jira/browse/SLIDER-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14731952#comment-14731952
]
Steve Loughran commented on SLIDER-934:
---------------------------------------
OK, there's a unit test failing now
{code}
ate
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 31.052 sec <<<
FAILURE! - in org.apache.slider.agent.actions.TestActionList
testActionListSuite(org.apache.slider.agent.actions.TestActionList) Time
elapsed: 29.863 sec <<< FAILURE!
org.codehaus.groovy.runtime.powerassert.PowerAssertionError: assert -1 ==
sliderClient.actionList("", new ActionListArgs(live: true))
| | | |
| | 0
org.apache.slider.common.params.ActionListArgs@2b287e24: list
| Slider Client in state STARTED and Slider Application Instance
testactionlist
false
at
org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:399)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:648)
at
org.apache.slider.agent.actions.TestActionList.testActionList(TestActionList.groovy:177)
at
org.apache.slider.agent.actions.TestActionList.testActionListSuite(TestActionList.groovy:80)
{code}
I think it shows up that in fact the original listing policy changed behaviour
depending on whether or not --live was set
{{slider list}} = 0 if no clusters found
{{slider list --live}} -1 if no clusters found
I actually think we should just be consistent and have 0 for both, unless
there's a real need for the CLI to enumerate the existence of running clusters
and have a return code if there are/aren't any. In that case, why not have
another argument to specify this {{--nonempty}} which would change the outcome
to -1.
thoughts?
> changes in list Action broke return codes from `list` action
> ------------------------------------------------------------
>
> Key: SLIDER-934
> URL: https://issues.apache.org/jira/browse/SLIDER-934
> Project: Slider
> Issue Type: Bug
> Components: client
> Affects Versions: Slider 0.81
> Reporter: Steve Loughran
> Assignee: Gour Saha
> Fix For: Slider 0.81
>
>
> in SLIDER-928 the exit code logic of the list operations has changed, now if
> 0 entries are found the exit code is -1.
> Before this change, if you did a "list" without args, it would return 0
> irrespective of the number of apps. That is: the operation worked, its just
> an empty listing.
> The breaks {{AgentClusterLifecycleIT}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)