Skip to content

Commit

Permalink
add timeout to notifications testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Jun 1, 2023
1 parent 6a90e70 commit 5831db1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pgengine/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ func TestHandleNotifications(t *testing.T) {
c.Start.Debug = true
})
defer teardownTestCase(t)
ctx, cancel := context.WithTimeout(context.Background(), 7*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()
go pge.HandleNotifications(ctx)
time.Sleep(5 * time.Second)
conn, err := pge.ConfigDb.Acquire(ctx) // HandleNotifications() uses blocking manner, so we want another connection
assert.NoError(t, err)
defer conn.Release()
Expand Down

0 comments on commit 5831db1

Please sign in to comment.