Skip to content

Commit

Permalink
wait after spanner test client is disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinFrazar authored and github-actions committed Dec 3, 2024
1 parent 7438468 commit ce348d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/srv/db/spanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ func TestAuditSpanner(t *testing.T) {
require.True(t, ok)
require.Equal(t, "googlesql", dbStart1.DatabaseName)

// the connection should start to shut down, but wait some time for that
// to happen before sending further RPCs so that the client will dial
// a new connection before sending another query RPC.
time.Sleep(500 * time.Millisecond)
row, err = pingSpanner(ctx, clt, 42)
require.Error(t, err)
require.ErrorContains(t, err, "access to db denied")
Expand Down

0 comments on commit ce348d4

Please sign in to comment.