Skip to content

Improve tests#2884

Merged
jeremydmiller merged 7 commits into
JasperFx:mainfrom
dmytro-pryvedeniuk:improve-marten-tests
May 23, 2026
Merged

Improve tests#2884
jeremydmiller merged 7 commits into
JasperFx:mainfrom
dmytro-pryvedeniuk:improve-marten-tests

Conversation

@dmytro-pryvedeniuk
Copy link
Copy Markdown
Contributor

@dmytro-pryvedeniuk dmytro-pryvedeniuk commented May 21, 2026

This PR brings some improvements for the tests. There are many changes but they are scoped to the tests only.

General changes in all tests:

  • Dispose IDisposable items properly (IHost, CancellationTokenSource, db connections and commands)
  • I want to address similar issues in non-testing code with the same approach: "a disposable should be disposed" - in a separate PR.

Marten-specific changes:

  • Use DisableConventionalDiscovery with explicit handler registration and DurabilityMode.Solo in most of the tests
  • Remove pre-generated handlers. It's not obvious how to update them in the test project
  • Distribution tests are updated to include more checks, parallelize some tasks, simplify code.
  • Tests marked as flaky were unmarked as they are stable enough.

@dmytro-pryvedeniuk dmytro-pryvedeniuk changed the title Improve tests Improve Marten tests May 21, 2026
@dmytro-pryvedeniuk dmytro-pryvedeniuk marked this pull request as ready for review May 22, 2026 15:41
@dmytro-pryvedeniuk dmytro-pryvedeniuk changed the title Improve Marten tests Improve tests May 23, 2026
@jeremydmiller jeremydmiller merged commit f5ca20d into JasperFx:main May 23, 2026
22 checks passed
@dmytro-pryvedeniuk dmytro-pryvedeniuk deleted the improve-marten-tests branch May 23, 2026 21:40
This was referenced Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants