NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Extract persistence specific acceptance tests in separate package

Open timbussmann opened this issue 2 years ago • 0 comments

Describe the suggested improvement

Many of the persistence implementations try to limit the acceptance tests run within the persister to only acceptance tests relevant to persistence functionality to reduce test run time.

This is currently done by specifically removing all acceptance tests based on folder names, e.g.

  • https://github.com/Particular/NServiceBus.Persistence.CosmosDB/blob/master/src/NServiceBus.Persistence.CosmosDB.LogicalOutbox.AcceptanceTests/NServiceBus.Persistence.CosmosDB.LogicalOutbox.AcceptanceTests.csproj#L32
  • https://github.com/Particular/NServiceBus.RavenDB/blob/master/src/NServiceBus.RavenDB.AcceptanceTests/NServiceBus.RavenDB.AcceptanceTests.csproj#L20

This approach is very brittle, noisy, and needs manual updates whenever the acceptance tests folder are changed.

A simple solution could be to extract the persistence-specific tests, primarily tests, in the saga and outbox folders, into a separate nuget package that can be referenced by the persistence packages rather than importing the full test suite.

It might still make sense to keep these tests in the main acceptance tests package too rather than fully extracting them.

Additional Context

No response

timbussmann avatar Apr 24 '23 16:04 timbussmann