Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat PartialSuccess as Success #9260

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
jmacd committed Feb 2, 2024
commit 073ed55bca9646c0bac1ec040901c0deec530e25
8 changes: 4 additions & 4 deletions exporter/otlphttpexporter/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func TestPartialSuccess_logs(t *testing.T) {
err = exp.ConsumeLogs(context.Background(), logs)
require.NoError(t, err)
require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1)
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "partial success")
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success")
}

func TestPartialResponse_missingHeaderButHasBody(t *testing.T) {
Expand Down Expand Up @@ -568,7 +568,7 @@ func TestPartialSuccess_longContentLengthHeader(t *testing.T) {
err = handlePartialSuccessResponse(resp, exp.tracesPartialSuccessHandler)
assert.NoError(t, err)
assert.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1)
assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "partial success")
assert.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success")
}

func TestPartialSuccessInvalidResponseBody(t *testing.T) {
Expand Down Expand Up @@ -624,7 +624,7 @@ func TestPartialSuccess_traces(t *testing.T) {
err = exp.ConsumeTraces(context.Background(), traces)
require.NoError(t, err)
require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1)
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "partial success")
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success")
}

func TestPartialSuccess_metrics(t *testing.T) {
Expand Down Expand Up @@ -663,7 +663,7 @@ func TestPartialSuccess_metrics(t *testing.T) {
err = exp.ConsumeMetrics(context.Background(), metrics)
require.NoError(t, err)
require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), 1)
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "partial success")
require.Contains(t, observed.FilterLevelExact(zap.WarnLevel).All()[0].Message, "Partial success")
}

func createBackend(endpoint string, handler func(writer http.ResponseWriter, request *http.Request)) *httptest.Server {
Expand Down
Loading