Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Jul 19, 2024
1 parent 42ec1ff commit 6beb82a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .chloggen/correctness-traces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ change_type: bug_fix
component: opencensusreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Check for ErrListenerClosed error before reporting multiplexer status.
note: Do not report an error into resource status during receiver shutdown when the listener connection was closed.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [33865]
Expand Down
6 changes: 4 additions & 2 deletions receiver/opencensusreceiver/opencensus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,14 @@ func TestStartListenerClosed(t *testing.T) {
resp, err := client.Do(req)
require.NoError(t, err, "Error posting trace to grpc-gateway server: %v", err)

defer func() {
require.NoError(t, resp.Body.Close())
}()

respBytes, err := io.ReadAll(resp.Body)
require.NoError(t, err)
respStr := string(respBytes)

require.NoError(t, resp.Body.Close())

assert.Equal(t, http.StatusOK, resp.StatusCode)
assert.Empty(t, respStr)

Expand Down

0 comments on commit 6beb82a

Please sign in to comment.