Skip to content

Commit 113e674

Browse files
WIP.
1 parent 9e3bc1c commit 113e674

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/logic/coordinator_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ func TestCoordinator(t *testing.T) {
138138
coord.applier = applier
139139
coord.InitializeWorkers(8)
140140

141+
streamCtx, cancelStreaming := context.WithCancel(context.Background())
141142
canStopStreaming := func() bool {
142-
return false
143+
return streamCtx.Err() != nil
143144
}
144145
go func() {
145146
err = coord.StartStreaming(canStopStreaming)
@@ -153,6 +154,7 @@ func TestCoordinator(t *testing.T) {
153154

154155
for {
155156
if ctx.Err() != nil {
157+
cancelStreaming()
156158
break
157159
}
158160

0 commit comments

Comments
 (0)