(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func Test_Connectable_IterableChannel_Disposed(t *testing.T) { |
| 47 | defer goleak.VerifyNone(t) |
| 48 | ch := make(chan Item, 10) |
| 49 | go func() { |
| 50 | ch <- Of(1) |
| 51 | ch <- Of(2) |
| 52 | ch <- Of(3) |
| 53 | close(ch) |
| 54 | }() |
| 55 | obs := &ObservableImpl{ |
| 56 | iterable: newChannelIterable(ch, WithPublishStrategy()), |
| 57 | } |
| 58 | ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) |
| 59 | defer cancel() |
| 60 | _, disposable := obs.Connect(ctx) |
| 61 | disposable() |
| 62 | time.Sleep(50 * time.Millisecond) |
| 63 | Assert(ctx, t, obs, IsEmpty()) |
| 64 | } |
| 65 | |
| 66 | func Test_Connectable_IterableChannel_WithoutConnect(t *testing.T) { |
| 67 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…