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 26, 2024
1 parent 4466fc1 commit fbd720f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/integration/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ func (s *subscriptionResolver) Count(ctx context.Context) (<-chan int, error) {
go func(respChan chan int) {
counter := 0
for {
if counter == 3 {
close(respChan)
}
respChan <- counter
counter++
time.Sleep(time.Second)
Expand Down

0 comments on commit fbd720f

Please sign in to comment.