Skip to content

Commit 9061a25

Browse files
authored
Merge pull request #217 from clj-commons/bugfix/fix-fragile-go-off-tests
Reduce levels of go-off nesting in `go-off-nests` test
2 parents 94b9403 + 282f0af commit 9061a25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/manifold/go_off_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
(deftest go-off-nests
5858
(testing "return deferred will always result in a a realizable value, not another deferred"
5959
(is (= [23 42] @(go-off (let [let* 1 a 23] (go-off (let* [b 42] [a b]))))))
60-
(is (= 5 @(go-off (go-off (go-off (go-off (go-off (go-off (go-off 5))))))))))
60+
(is (= 5 @(go-off (go-off (go-off (go-off (go-off 5))))))))
6161
(testing "Parking unwraps nested deferreds"
6262
(is (= 5 @(go-off (<!? (go-off (go-off (go-off 5)))))))))
6363

@@ -173,4 +173,4 @@
173173
(bench "go-off deferred x5"
174174
@(go-off (inc (<!? (inc (<!? (inc (<!? (inc (<!? (inc (<!? (d/success-deferred 0))))))))))))
175175
(bench "go-off future 200 x5"
176-
@(go-off (inc (<!? (inc (<!? (inc (<!? (inc (<!? (inc (<!? (d/future (Thread/sleep 200) 0)))))))))))))))
176+
@(go-off (inc (<!? (inc (<!? (inc (<!? (inc (<!? (inc (<!? (d/future (Thread/sleep 200) 0)))))))))))))))

0 commit comments

Comments
 (0)