Skip to content

Resume recording in [NoDb] tests - #1096

Merged
SimonCropp merged 1 commit into
mainfrom
nodb-resume-recording
Sep 29, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
nodb-resume-recording

Conversation

@SimonCropp

Copy link
Copy Markdown
Owner

Follow-up to #1094.

Problem

Each LocalDbTestBase starts recording paused and resumes it on the first access of ActData. A [NoDb] test has no ActData, so recording stayed paused for the whole test. Anything else captured through Recording, such as NServiceBus messages sent by the code under test, silently dropped out of the snapshot.

This showed up when moving a timer test to [NoDb]. The test only verified a sent message, and its snapshot went from the message to {}.

Change

  • Each of the MSTest, NUnit, TUnit and xunit.v3 bases calls Recording.Resume() in the [NoDb] setup branch.
  • An IsRecording test was added to NoDbTests for each framework.
  • The [NoDb] docs note that recording is resumed.
  • Version bumped to 27.2.2.

All four framework test projects pass locally.

Recording starts paused and resumes on the first ActData access. A [NoDb]
test has no ActData, so recording stayed paused and other recorded
activity, such as NServiceBus messages, silently dropped out of snapshots.
Resume it when a [NoDb] test starts. Bump to 27.2.2.
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.

1 participant