Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafasen81 authored and msenarista committed Jan 9, 2024
1 parent 1b25e7d commit 0b23381
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/transport/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2152,13 +2152,14 @@ func (s) TestWriteHeaderConnectionError(t *testing.T) {
return false, nil
})

server.mu.Lock()

if len(server.conns) != 1 {
t.Fatalf("Server has %d connections from the client, want 1", len(server.conns))
}

// Get the server transport for the connecton to the client.
var serverTransport *http2Server
server.mu.Lock()
for k := range server.conns {
serverTransport = k.(*http2Server)
}
Expand All @@ -2173,7 +2174,7 @@ func (s) TestWriteHeaderConnectionError(t *testing.T) {
t.Fatalf("Client failed to create first stream. Err: %v", err)
}

<-notifyChan // Wait server stream to be established.
<-notifyChan // Wait for server stream to be established.
var sstream *Stream
// Access stream on the server.
serverTransport.mu.Lock()
Expand All @@ -2189,7 +2190,7 @@ func (s) TestWriteHeaderConnectionError(t *testing.T) {

client.Close(fmt.Errorf("closed manually by test"))

// Wait server transport to be closed.
// Wait for server transport to be closed.
<-serverTransport.done

// Write header on a closed server transport.
Expand Down

0 comments on commit 0b23381

Please sign in to comment.