MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Test_Observable_FlatMap_Parallel

Function Test_Observable_FlatMap_Parallel

observable_operator_test.go:802–810  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

800}
801
802func Test_Observable_FlatMap_Parallel(t *testing.T) {
803 defer goleak.VerifyNone(t)
804 ctx, cancel := context.WithCancel(context.Background())
805 defer cancel()
806 obs := testObservable(ctx, 1, 2, 3).FlatMap(func(i Item) Observable {
807 return testObservable(ctx, i.V.(int)+1, i.V.(int)*10)
808 }, WithCPUPool())
809 Assert(ctx, t, obs, HasItemsNoOrder(2, 10, 3, 20, 4, 30))
810}
811
812func Test_Observable_FlatMap_Parallel_Error1(t *testing.T) {
813 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 5

testObservableFunction · 0.85
WithCPUPoolFunction · 0.85
AssertFunction · 0.85
HasItemsNoOrderFunction · 0.85
FlatMapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…