Skip to content

Commit

Permalink
Close channel in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HaraldNordgren committed Sep 27, 2024
1 parent 4466fc1 commit fa3054c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/integration/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ func (s *subscriptionResolver) Count(ctx context.Context) (<-chan int, error) {
go func(respChan chan int) {
counter := 0
for {
if counter == 3 {
close(respChan)
return
}
respChan <- counter
counter++
time.Sleep(time.Second)
Expand Down

0 comments on commit fa3054c

Please sign in to comment.