Skip to content

Adding multiple containers with the same type in unit tests causes unexpected behaviour #471

@PeterStephenson

Description

@PeterStephenson

Config as follows:

cosmos
    .AddEventSourcing(o => o.AutoEscapeIds = true)
    .AddEventSource<SocialEventEvent>("SocialEventsEventStreams", c =>
    {
        c.AddProjection<SocialEvent>().WithSnapshot("SocialEvents", _ => nameof(SocialEvent));
    });
            s.AddTestCosmosDb()
                .WithPreProvisionedContainer<SocialEventEvent>("SocialEventsEventStreams")
                .WithPreProvisionedContainer<SocialEventEvent>("SocialEvents");

Change feed triggered itself

  • Event written to event store
  • Change feed ran persisted to the same container mock
  • triggered change feed again and error as deserialized EventBody as null and null type was not in the type map

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions