Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
w1am committed Aug 28, 2024
1 parent 1ff5d29 commit ea304cb
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Text.Json;
using EventStore.Client.Diagnostics;
using EventStore.Diagnostics.Tracing;

Expand Down Expand Up @@ -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();
Expand All @@ -107,8 +106,11 @@ await Fixture.Streams.AppendToStreamAsync(
.ToListAsync();

var outputMetadata = readResult[0].OriginalEvent.Metadata.ToArray();
var test = JsonSerializer.Deserialize<object>(outputMetadata);
outputMetadata.ShouldBe(inputMetadata);
outputMetadata.ShouldNotBe(inputMetadata);

var appendActivities = Fixture.GetActivitiesForOperation(TracingConstants.Operations.Append, stream);

appendActivities.ShouldNotBeEmpty();
}

[Fact]
Expand Down

0 comments on commit ea304cb

Please sign in to comment.