You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, each task's done Future should resolve with the TaskResult instance. The CLIs should return this same TaskResult.
Calling .run() is simpler and eventually returns the end result that consumers want. However, calling .start() gives the consumer the opportunity to stream the output to somewhere like stdout for live feedback.
This will allow our integration tests to call into the CLIs directly to programmatically execute the tests instead of spawning new processes to do that. The returned result can then be used easily by the test to verify information about the task without having to parse the stdout output.
The text was updated successfully, but these errors were encountered:
Each task API should define a set of exceptions that may be thrown. The CLI should catch these exceptions and display the message (without stack trace) as the failure message.
This provides a clean usage pattern on both fronts - API users can catch a specific exception, and CLI users will see a helpful message without an ugly stacktrace.
charliekump-wf
changed the title
Refactor task APIs and CLIs to be more consistent in their usage and the returned result
CP-2149 Refactor task APIs and CLIs to be more consistent in their usage and the returned result
Jul 28, 2016
Each task should have two static methods:
Additionally, each task's
done
Future should resolve with theTaskResult
instance. The CLIs should return this sameTaskResult
.Calling
.run()
is simpler and eventually returns the end result that consumers want. However, calling.start()
gives the consumer the opportunity to stream the output to somewhere like stdout for live feedback.This will allow our integration tests to call into the CLIs directly to programmatically execute the tests instead of spawning new processes to do that. The returned result can then be used easily by the test to verify information about the task without having to parse the stdout output.
The text was updated successfully, but these errors were encountered: