Skip to content

Commit

Permalink
Bump timeouts on some intermittent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattford63 committed Oct 20, 2022
1 parent 9d36513 commit 3e837bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/jackdaw/test/transports/kafka_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
(filter (fn [m]
(= 2 (get-in m [:value :id]))))
first))
1000
5000
"failed to find test-out=2")
:info)]

Expand Down
14 changes: 9 additions & 5 deletions test/jackdaw/test_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
(with-open [t (jd.test/test-machine (kafka-transport))]
(let [write (cmd/write! "foo" {:id "msg1" :payload "yolo"})
watch (cmd/watch (by-id "foo" "msg1")
{:info "failed to find foo with id=msg1"})
{:info "failed to find foo with id=msg1"
:timeout 5000})
{:keys [results journal]} (jd.test/run-test t [write watch])
[write-result watch-result] results]

Expand All @@ -143,7 +144,8 @@
{"MESSAGE.DATE" (.getBytes "1970-01-01")
"MESSAGE.VERSION" (.getBytes "1.0.1")}})
watch (cmd/watch (by-id "foo" "msg1")
{:info "failed to find foo with id=msg1"})
{:info "failed to find foo with id=msg1"
:timeout 5000})
{:keys [results journal]} (jd.test/run-test t [write watch])
[write-result watch-result] results]

Expand Down Expand Up @@ -174,11 +176,13 @@
(with-open [t (jd.test/test-machine (kafka-transport))]
(let [prog1 [(cmd/write! "foo" {:id "msg2" :payload "yolo"})
(cmd/watch (by-id "foo" "msg2")
{:info "failed to find foo with id=msg2"})]
{:info "failed to find foo with id=msg2"
:timeout 5000})]

prog2 [(cmd/write! "foo" {:id "msg3" :payload "you only live twice"})
(cmd/watch (by-id "foo" "msg3")
{:info "failed to find foo with id=msg3"})]]
{:info "failed to find foo with id=msg3"
:timeout 5000})]]

(testing "run test sequence and inspect results"
(let [{:keys [results journal]} (jd.test/run-test t prog1)]
Expand Down Expand Up @@ -248,7 +252,7 @@
(= (get-in r [:value :id]) "2")))
(not-empty))
true))
{:timeout 2000})])))
{:timeout 5000})])))
(catch Exception e
(reset! error-raised e)))
(is (not @error-raised))))
Expand Down

0 comments on commit 3e837bd

Please sign in to comment.