Created
January 24, 2016 12:20
-
-
Save lbradstreet/18a87fa35339a15bc80b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/onyx/plugin/http_output_test.clj b/test/onyx/plugin/http_output_test.clj | |
index b18178e..e46c7de 100644 | |
--- a/test/onyx/plugin/http_output_test.clj | |
+++ b/test/onyx/plugin/http_output_test.clj | |
@@ -12,10 +12,11 @@ | |
[{:url "http://localhost:41300/" :args {:body "a=1" :as :json}} | |
{:url "http://localhost:41300/" :args {:body "b=2" :as :json}} | |
{:url "http://localhost:41300/" :args {:body "c=3" :as :json}} | |
- :done]) | |
+ ;:done | |
+ ]) | |
(def in-chan (chan (count messages))) | |
-(def out-chan (chan (count messages))) | |
+(def out-chan (chan (inc (count messages)))) | |
(defn inject-in-ch [event lifecycle] | |
{:core.async/chan in-chan}) | |
@@ -46,7 +47,7 @@ | |
(defn async-handler [request] | |
(let [ch (chan)] | |
(go | |
- (>! out-chan "ZZ" #_(.read (:body request))) | |
+ (>! out-chan (.read (:body request))) | |
(>! ch | |
{:body "{\"success\": true}" | |
:headers {"Content-Type" "json"} | |
@@ -102,8 +103,11 @@ | |
_ (info "Awaiting job completion") | |
_ (onyx.api/await-job-completion peer-config (:job-id job)) | |
_ (info "Job completed") | |
+ _ (>!! out-chan :done) | |
_ (close! out-chan) | |
+ _ (info "taking segments") | |
results (take-segments! out-chan) | |
+ _ (info "took segments") | |
_ (info "Stopping Jetty server") | |
_ (.stop server) | |
_ (.destroy server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment