From ea304cb4ec381bcff6b86877bfc654a14cd96200 Mon Sep 17 00:00:00 2001 From: William Chong Date: Wed, 28 Aug 2024 18:26:35 +0400 Subject: [PATCH] Update tests --- .../Diagnostics/StreamsTracingInstrumentationTests.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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]