Skip test assertions which hang in single-cpu env
Replaces previous patch which didn't work on autobuilders, tests still
failed systematically.
Closes: #1013662
Jérôme Charaoui
1 year, 8 months ago
|
0 |
From: =?utf-8?b?SsOpcsO0bWUgQ2hhcmFvdWk=?= <jerome@riseup.net>
|
|
1 |
Date: Tue, 5 Jul 2022 17:56:14 -0400
|
|
2 |
Subject: Skip test assertions which hang in single-cpu env
|
|
3 |
|
|
4 |
This part hangs indefinitely (possible deadlock) when running on a
|
|
5 |
signle-cpu system, or as a part of a single-cpu bound cgroup.
|
|
6 |
|
|
7 |
Forwarded: no
|
|
8 |
---
|
|
9 |
src/test/clojure/clojure/core/async_test.clj | 18 +-----------------
|
|
10 |
1 file changed, 1 insertion(+), 17 deletions(-)
|
|
11 |
|
|
12 |
diff --git a/src/test/clojure/clojure/core/async_test.clj b/src/test/clojure/clojure/core/async_test.clj
|
|
13 |
index b6028d3..57a2780 100644
|
|
14 |
--- a/src/test/clojure/clojure/core/async_test.clj
|
|
15 |
+++ b/src/test/clojure/clojure/core/async_test.clj
|
|
16 |
@@ -288,23 +288,7 @@
|
|
17 |
(is (= [0 1 2 3]
|
|
18 |
(<!! (a/into [] a))))
|
|
19 |
(is (= [0 1 2 3]
|
|
20 |
- (<!! (a/into [] b)))))
|
|
21 |
-
|
|
22 |
- ;; ASYNC-127
|
|
23 |
- (let [ch (to-chan! [1 2 3])
|
|
24 |
- m (mult ch)
|
|
25 |
- t-1 (chan)
|
|
26 |
- t-2 (chan)
|
|
27 |
- t-3 (chan)]
|
|
28 |
- (tap m t-1)
|
|
29 |
- (tap m t-2)
|
|
30 |
- (tap m t-3)
|
|
31 |
- (close! t-3)
|
|
32 |
- (is (= 1 (<!! t-1)))
|
|
33 |
- (is (= nil (a/poll! t-1))) ;; t-2 hasn't taken yet
|
|
34 |
- (is (= 1 (<!! t-2)))
|
|
35 |
- (is (= 2 (<!! t-1))) ;; now available
|
|
36 |
- (is (= nil (a/poll! t-1)))))
|
|
37 |
+ (<!! (a/into [] b))))))
|
|
38 |
|
|
39 |
(testing "mix"
|
|
40 |
(let [out (chan)
|
debian/patches/0002_Fix_Test_Timing.patch
less
more
0 | |
Revert upstream commit 094d239e0261263de3799bb6bd1cc33f06833d8b "make test less
|
1 | |
timing dependent", as it seems to intermittently create the following
|
2 | |
regression:
|
3 | |
|
4 | |
lein test :only clojure.core.async-test/ops-tests
|
5 | |
|
6 | |
FAIL in (ops-tests) (async_test.clj:304)
|
7 | |
mult
|
8 | |
expected: (= nil (a/poll! t-1))
|
9 | |
actual: (not (= nil 2))
|
10 | |
|
11 | |
lein test :only clojure.core.async-test/ops-tests
|
12 | |
|
13 | |
FAIL in (ops-tests) (async_test.clj:305)
|
14 | |
mult
|
15 | |
expected: (= 1 (<!! t-2))
|
16 | |
actual: (not (= 1 2))
|
17 | |
|
18 | |
lein test :only clojure.core.async-test/ops-tests
|
19 | |
|
20 | |
FAIL in (ops-tests) (async_test.clj:306)
|
21 | |
mult
|
22 | |
expected: (= 2 (<!! t-1))
|
23 | |
actual: (not (= 2 3))
|
24 | |
Index: core-async-clojure/src/test/clojure/clojure/core/async_test.clj
|
25 | |
===================================================================
|
26 | |
--- core-async-clojure.orig/src/test/clojure/clojure/core/async_test.clj
|
27 | |
+++ core-async-clojure/src/test/clojure/clojure/core/async_test.clj
|
28 | |
@@ -300,10 +300,10 @@
|
29 | |
(tap m t-2)
|
30 | |
(tap m t-3)
|
31 | |
(close! t-3)
|
32 | |
- (is (= 1 (<!! t-1)))
|
33 | |
+ (is (= 1 (a/poll! t-1)))
|
34 | |
(is (= nil (a/poll! t-1))) ;; t-2 hasn't taken yet
|
35 | |
- (is (= 1 (<!! t-2)))
|
36 | |
- (is (= 2 (<!! t-1))) ;; now available
|
37 | |
+ (is (= 1 (a/poll! t-2)))
|
38 | |
+ (is (= 2 (a/poll! t-1))) ;; now available
|
39 | |
(is (= nil (a/poll! t-1)))))
|
40 | |
|
41 | |
(testing "mix"
|
0 | 0 |
0001_Lein_Local.patch
|
1 | |
0002_Fix_Test_Timing.patch
|
|
1 |
0002-Skip-test-assertions-which-hang-in-single-cpu-env.patch
|