(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestOTLPLimits(t *testing.T) { |
| 96 | util.RunIntegrationTests(t, util.TestHarnessConfig{ |
| 97 | ConfigOverlay: configIngest, |
| 98 | }, func(h *util.TempoHarness) { |
| 99 | h.WaitTracesWritable(t) |
| 100 | protoSpans := test.MakeProtoSpans(100) |
| 101 | |
| 102 | // gRPC |
| 103 | grpcClient := otlptracegrpc.NewClient( |
| 104 | otlptracegrpc.WithEndpoint(h.Services[util.ServiceDistributor].Endpoint(4317)), |
| 105 | otlptracegrpc.WithInsecure(), |
| 106 | otlptracegrpc.WithRetry(otlptracegrpc.RetryConfig{Enabled: false}), |
| 107 | ) |
| 108 | require.NoError(t, grpcClient.Start(context.Background())) |
| 109 | |
| 110 | grpcErr := grpcClient.UploadTraces(context.Background(), protoSpans) |
| 111 | assert.Error(t, grpcErr) |
| 112 | require.Equal(t, codes.ResourceExhausted, status.Code(grpcErr)) |
| 113 | |
| 114 | // HTTP |
| 115 | httpClient := otlptracehttp.NewClient( |
| 116 | otlptracehttp.WithEndpoint(h.Services[util.ServiceDistributor].Endpoint(4318)), |
| 117 | otlptracehttp.WithInsecure(), |
| 118 | otlptracehttp.WithRetry(otlptracehttp.RetryConfig{Enabled: false}), |
| 119 | ) |
| 120 | require.NoError(t, httpClient.Start(context.Background())) |
| 121 | |
| 122 | httpErr := httpClient.UploadTraces(context.Background(), protoSpans) |
| 123 | assert.Error(t, httpErr) |
| 124 | require.Contains(t, httpErr.Error(), "retry-able request failure") |
| 125 | }) |
| 126 | } |
| 127 | |
| 128 | func TestOTLPLimitsVanillaClient(t *testing.T) { |
| 129 | util.RunIntegrationTests(t, util.TestHarnessConfig{ |
nothing calls this directly
no test coverage detected