diff --git a/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Resources/TestAWSECSResourceDetector.cs b/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Resources/TestAWSECSResourceDetector.cs index 38c8c2377f..53d029ba0d 100644 --- a/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Resources/TestAWSECSResourceDetector.cs +++ b/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Resources/TestAWSECSResourceDetector.cs @@ -155,14 +155,14 @@ public MockEcsMetadataEndpoint(string containerJsonPath, string taskJsonPath) var content = await File.ReadAllTextAsync($"{Environment.CurrentDirectory}/Resources/{containerJsonPath}"); var data = Encoding.UTF8.GetBytes(content); context.Response.ContentType = "application/json"; - await context.Response.Body.WriteAsync(data, 0, data.Length); + await context.Response.Body.WriteAsync(data); } else if (context.Request.Method == HttpMethods.Get && context.Request.Path == "/task") { var content = await File.ReadAllTextAsync($"{Environment.CurrentDirectory}/Resources/{taskJsonPath}"); var data = Encoding.UTF8.GetBytes(content); context.Response.ContentType = "application/json"; - await context.Response.Body.WriteAsync(data, 0, data.Length); + await context.Response.Body.WriteAsync(data); } else { diff --git a/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Trace/TestAWSXRayPropagator.cs b/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Trace/TestAWSXRayPropagator.cs index a314b89850..b3a6b4aa35 100644 --- a/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Trace/TestAWSXRayPropagator.cs +++ b/test/OpenTelemetry.Contrib.Extensions.AWSXRay.Tests/Trace/TestAWSXRayPropagator.cs @@ -29,11 +29,7 @@ public class TestAWSXRayPropagator private const string TraceId = "5759e988bd862e3fe1be46a994272793"; private const string ParentId = "53995c3f42cd8ad8"; -#if NETFRAMEWORK - private static readonly string[] Empty = new string[0]; -#else private static readonly string[] Empty = Array.Empty(); -#endif private static readonly Func, string, IEnumerable> Getter = (headers, name) => {