Skip to content

Commit

Permalink
fixed debounce test (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
singyiu authored Jul 20, 2022
1 parent 7a67822 commit 2bc9df9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions observable_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,14 @@ func Test_Observable_Count_Parallel(t *testing.T) {
HasItem(int64(10000)))
}

// FIXME
//func Test_Observable_Debounce(t *testing.T) {
// defer goleak.VerifyNone(t)
// ctx, obs, d := timeCausality(1, tick, 2, tick, 3, 4, 5, tick, 6, tick)
// Assert(ctx, t, obs.Debounce(d, WithBufferedChannel(10), WithContext(ctx)),
// HasItems(1, 2, 5, 6))
//}
func Test_Observable_Debounce(t *testing.T) {
defer goleak.VerifyNone(t)
ctx, obs, d := timeCausality(1, tick, 2, tick, 3, 4, 5, tick, 6, tick)
ctx, cancel := context.WithCancel(ctx)
defer cancel()
Assert(ctx, t, obs.Debounce(d, WithBufferedChannel(10), WithContext(ctx)),
HasItems(1, 2, 5, 6))
}

func Test_Observable_Debounce_Error(t *testing.T) {
defer goleak.VerifyNone(t)
Expand Down

0 comments on commit 2bc9df9

Please sign in to comment.