Skip to content

Commit

Permalink
Fixed race
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmu committed Nov 21, 2023
1 parent 6cdc246 commit 748a835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres/connection/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestReceive(t *testing.T) {
_, err := clientConn.Write(encodedMessage[:len(encodedMessage)/2])
require.NoError(t, err)

wg := sync.WaitGroup{}
wg := &sync.WaitGroup{}
wg.Add(1)
var receivedMessage connection.Message
go func() {
Expand Down Expand Up @@ -141,7 +141,7 @@ func getLocalHostConnection(t *testing.T) (net.Conn, net.Conn) {
require.NoError(t, err)
defer ln.Close()

wg := sync.WaitGroup{}
wg := &sync.WaitGroup{}
wg.Add(2)

var serverConn net.Conn
Expand Down

0 comments on commit 748a835

Please sign in to comment.