Skip to content

Commit ebc9ba2

Browse files
committed
fixed unchecked condition in test
1 parent bab0bcf commit ebc9ba2

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

notes/0.99.7.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11

22
- added append and flatMap operation for inputs.
33
- added Sieve to set of examples
4-
- implemented fold over selector. example:
4+
- implemented fold over selector.
55
- implemented EffectedInput/EffectedOutput
66
(more detailed about fold over selected and Effected pattern can
77
be readed at https://github.com/rssh/notes/blob/master/2016_03_05_see-ma-no-vars.md )
88
- akka 2.4.2
9+
- channels by defaults now unbuffered. (as in Go)
910

1011

src/test/scala/gopher/channels/UnbufferedSelectSuite.scala

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,24 @@ class UnbufferedSelectSuite extends FunSuite with AsyncAssertions
2020

2121
test("write without read must block ") {
2222
import gopherApi._
23-
val channel1 = makeChannel[Int](0)
24-
val w1 = channel1.awrite(1)
23+
for(i <- 0 until 100) {
24+
val channel1 = makeChannel[Int](0)
25+
val w1 = channel1.awrite(1)
2526

26-
assert(!w1.isCompleted)
27+
assert(!w1.isCompleted)
2728

28-
val r1 = channel1.aread
29+
val r1 = channel1.aread
2930

30-
Await.ready(r1, 10 seconds)
31+
Await.ready(w1, 10 seconds)
32+
Await.ready(r1, 10 seconds)
3133

32-
assert(w1.isCompleted)
33-
assert(r1.isCompleted)
34+
assert(w1.isCompleted)
35+
assert(r1.isCompleted)
3436

35-
val rd = Await.result(r1, 10 seconds)
37+
val rd = Await.result(r1, 10 seconds)
38+
assert(rd==1)
39+
}
3640

37-
assert(rd==1)
3841
}
3942

4043
test("fold over selector with one-direction flow") {

0 commit comments

Comments
 (0)