We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8a7c9a commit 05cbc3cCopy full SHA for 05cbc3c
coderd/database/pubsub/pubsub_test.go
@@ -4,6 +4,7 @@ import (
4
"context"
5
"database/sql"
6
"testing"
7
+ "time"
8
9
"github.com/prometheus/client_golang/prometheus"
10
"github.com/stretchr/testify/assert"
@@ -179,6 +180,9 @@ func TestPGPubsubDriver(t *testing.T) {
179
180
181
// wait for the reconnect
182
_ = testutil.RequireRecvCtx(ctx, t, subDriver.Connections)
183
+ // we need to sleep because the raw connection notification
184
+ // is sent before the pq.Listener can reestablish it's listeners
185
+ time.Sleep(1 * time.Second)
186
187
// ensure our old subscription still fires
188
err = pubber.Publish("test", []byte("hello-again"))
0 commit comments