Permalink
Browse files

the method add-steps now recieves a seq

  • Loading branch information...
1 parent 50b0429 commit 8c3ab3f1ed3175fd639d9ab2a1b1735c5074f70c Brubacher, Federico committed Jan 25, 2013
View
3 src/main/clj/com/climate/services/aws/emr.clj
@@ -253,7 +253,8 @@
"Add a step to a running jobflow. Steps is a seq of StepConfig objects.
Use (step-config) to create StepConfig objects."
[jobflow-id steps]
- (.addJobFlowSteps *emr* (AddJobFlowStepsRequest. jobflow-id steps)))
+ (let [steps-array (to-array steps)]
+ (.addJobFlowSteps *emr* (AddJobFlowStepsRequest. jobflow-id steps))))
(defn start-job-flow [name steps {:keys [log-uri bootstrap-actions ami-version supported-products]
:or {bootstrap-actions [] supported-products []}
View
2 src/test/clj/com/climate/services/aws/emr_test.clj
@@ -178,6 +178,6 @@
(let [jf-id (setup)
dummy-steps (make-dummy-step)]
(is= 0 (.size (steps-for-jobflow jf-id)))
- (add-steps jf-id (java.util.ArrayList. [dummy-steps]))
+ (add-steps jf-id [dummy-steps])
(is= 1 (.size (steps-for-jobflow jf-id)))
(terminate-flow-id jf-id)))))

0 comments on commit 8c3ab3f

Please sign in to comment.