Skip to content

Commit

Permalink
update(TestRace): minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
b97tsk committed Jun 28, 2024
1 parent 343c9b6 commit 5f22cd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions race_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package rx_test

import (
"context"
"math/rand"
"testing"
"time"
Expand All @@ -16,8 +17,9 @@ func TestRace(t *testing.T) {

detachContext := rx.NewOperator(
func(source rx.Observable[string]) rx.Observable[string] {
return func(_ rx.Context, o rx.Observer[string]) {
source.Subscribe(rx.NewBackgroundContext(), o)
return func(c rx.Context, o rx.Observer[string]) {
c.Context = context.Background()
source.Subscribe(c, o)
}
},
)
Expand Down

0 comments on commit 5f22cd4

Please sign in to comment.