You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	Use randomly-available port in otlp exporters tests (#2627)
* use randomly-available port in otlp exporters tests * Update exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * Update exporters/otlp/otlptrace/otlptracegrpc/client_test.go Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
		| @@ -93,7 +93,7 @@ func newGRPCExporter(t *testing.T, ctx context.Context, endpoint string, additio | ||||
| } | ||||
|  | ||||
| func newExporterEndToEndTest(t *testing.T, additionalOpts []otlpmetricgrpc.Option) { | ||||
| 	mc := runMockCollectorAtEndpoint(t, "localhost:56561") | ||||
| 	mc := runMockCollector(t) | ||||
|  | ||||
| 	defer func() { | ||||
| 		_ = mc.stop() | ||||
| @@ -115,7 +115,7 @@ func newExporterEndToEndTest(t *testing.T, additionalOpts []otlpmetricgrpc.Optio | ||||
| } | ||||
|  | ||||
| func TestExporterShutdown(t *testing.T) { | ||||
| 	mc := runMockCollectorAtEndpoint(t, "localhost:56561") | ||||
| 	mc := runMockCollector(t) | ||||
| 	defer func() { | ||||
| 		_ = mc.Stop() | ||||
| 	}() | ||||
| @@ -296,7 +296,7 @@ func TestStartErrorInvalidAddress(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestEmptyData(t *testing.T) { | ||||
| 	mc := runMockCollectorAtEndpoint(t, "localhost:56561") | ||||
| 	mc := runMockCollector(t) | ||||
|  | ||||
| 	defer func() { | ||||
| 		_ = mc.stop() | ||||
| @@ -314,7 +314,7 @@ func TestEmptyData(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestFailedMetricTransform(t *testing.T) { | ||||
| 	mc := runMockCollectorAtEndpoint(t, "localhost:56561") | ||||
| 	mc := runMockCollector(t) | ||||
|  | ||||
| 	defer func() { | ||||
| 		_ = mc.stop() | ||||
|   | ||||
| @@ -374,7 +374,7 @@ func TestStartErrorInvalidAddress(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestEmptyData(t *testing.T) { | ||||
| 	mc := runMockCollectorAtEndpoint(t, "localhost:56561") | ||||
| 	mc := runMockCollector(t) | ||||
| 	t.Cleanup(func() { require.NoError(t, mc.stop()) }) | ||||
|  | ||||
| 	<-time.After(5 * time.Millisecond) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user