diff --git a/test/EventStore.Client.Streams.Tests/Diagnostics/StreamsTracingInstrumentationTests.cs b/test/EventStore.Client.Streams.Tests/Diagnostics/StreamsTracingInstrumentationTests.cs index b44569a13..4c23bfffa 100644 --- a/test/EventStore.Client.Streams.Tests/Diagnostics/StreamsTracingInstrumentationTests.cs +++ b/test/EventStore.Client.Streams.Tests/Diagnostics/StreamsTracingInstrumentationTests.cs @@ -1,4 +1,3 @@ -using System.Text.Json; using EventStore.Client.Diagnostics; using EventStore.Diagnostics.Tracing; @@ -89,7 +88,7 @@ await Fixture.Streams.AppendToStreamAsync( } [Fact] - public async Task TracingContextIsNotInjectedWhenEventIsNotJsonButHasJsonMetadata() { + public async Task TracingContextIsInjectedWhenEventIsNotJsonButHasJsonMetadata() { var stream = Fixture.GetStreamName(); var inputMetadata = Fixture.CreateTestJsonMetadata().ToArray(); @@ -107,8 +106,11 @@ await Fixture.Streams.AppendToStreamAsync( .ToListAsync(); var outputMetadata = readResult[0].OriginalEvent.Metadata.ToArray(); - var test = JsonSerializer.Deserialize(outputMetadata); - outputMetadata.ShouldBe(inputMetadata); + outputMetadata.ShouldNotBe(inputMetadata); + + var appendActivities = Fixture.GetActivitiesForOperation(TracingConstants.Operations.Append, stream); + + appendActivities.ShouldNotBeEmpty(); } [Fact]