Skip to content

Commit f525ac5

Browse files
committed
Fix GRPC exporter stringRepresentation tests
Also update OtlpGrpcMetricExporterTest and OtlpGrpcSpanExporterTest to match the actual toString() format that was changed in commit f720735.
1 parent 3954336 commit f525ac5

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

exporters/otlp/all/src/testDefaultSender/java/io/opentelemetry/exporter/otlp/metrics/OtlpGrpcMetricExporterTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ void stringRepresentation() {
8787
assertThat(metricExporter.toString())
8888
.matches(
8989
"OtlpGrpcMetricExporter\\{"
90-
+ "exporterName=otlp, "
91-
+ "type=metric, "
9290
+ "endpoint=http://localhost:4317, "
9391
+ "endpointPath=.*, "
9492
+ "timeoutNanos="
@@ -100,9 +98,12 @@ void stringRepresentation() {
10098
+ "compressorEncoding=null, "
10199
+ "headers=Headers\\{User-Agent=OBFUSCATED\\}, "
102100
+ "retryPolicy=RetryPolicy\\{.*\\}, "
101+
+ "componentLoader=.*, "
102+
+ "exporterType=OTLP_GRPC_METRIC_EXPORTER, "
103+
+ "internalTelemetrySchemaVersion=LEGACY, "
103104
+ "aggregationTemporalitySelector=AggregationTemporalitySelector\\{.*\\}, "
104105
+ "defaultAggregationSelector=DefaultAggregationSelector\\{.*\\}, "
105-
+ "memoryMode=IMMUTABLE_DATA"
106+
+ "memoryMode=(IMMUTABLE_DATA|REUSABLE_DATA)"
106107
+ "\\}");
107108
}
108109
}

exporters/otlp/all/src/testDefaultSender/java/io/opentelemetry/exporter/otlp/traces/OtlpGrpcSpanExporterTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ void stringRepresentation() {
3636
assertThat(spanExporter.toString())
3737
.matches(
3838
"OtlpGrpcSpanExporter\\{"
39-
+ "exporterName=otlp, "
40-
+ "type=span, "
4139
+ "endpoint=http://localhost:4317, "
4240
+ "endpointPath=.*, "
4341
+ "timeoutNanos="
@@ -49,7 +47,10 @@ void stringRepresentation() {
4947
+ "compressorEncoding=null, "
5048
+ "headers=Headers\\{User-Agent=OBFUSCATED\\}, "
5149
+ "retryPolicy=RetryPolicy\\{.*\\}, "
52-
+ "memoryMode=IMMUTABLE_DATA"
50+
+ "componentLoader=.*, "
51+
+ "exporterType=OTLP_GRPC_SPAN_EXPORTER, "
52+
+ "internalTelemetrySchemaVersion=LEGACY, "
53+
+ "memoryMode=(IMMUTABLE_DATA|REUSABLE_DATA)"
5354
+ "\\}");
5455
}
5556
}

0 commit comments

Comments
 (0)