Rig.TUnit.Databases.NoSql.KurrentDb 0.1.0-beta.2

This is a prerelease version of Rig.TUnit.Databases.NoSql.KurrentDb.
dotnet add package Rig.TUnit.Databases.NoSql.KurrentDb --version 0.1.0-beta.2
                    
NuGet\Install-Package Rig.TUnit.Databases.NoSql.KurrentDb -Version 0.1.0-beta.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rig.TUnit.Databases.NoSql.KurrentDb" Version="0.1.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rig.TUnit.Databases.NoSql.KurrentDb" Version="0.1.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Rig.TUnit.Databases.NoSql.KurrentDb" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rig.TUnit.Databases.NoSql.KurrentDb --version 0.1.0-beta.2
                    
#r "nuget: Rig.TUnit.Databases.NoSql.KurrentDb, 0.1.0-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rig.TUnit.Databases.NoSql.KurrentDb@0.1.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rig.TUnit.Databases.NoSql.KurrentDb&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rig.TUnit.Databases.NoSql.KurrentDb&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Tool

Rig.TUnit.Databases.NoSql.KurrentDb

Testcontainers-backed KurrentDB (post-rebrand EventStoreDB) fixture with StreamAssert for append-count verification.

What this package is

The Rig.TUnit KurrentDB provider (EventStoreDB rebranded — see https://www.kurrent.io/blog/kurrent-re-brand-faq). KurrentDbFixture spins KurrentDB via Testcontainers and returns a KurrentDB.Client ready for append / read. Ships StreamAssert.EventsAppendedAsync — reads a stream forwards from start and returns the total event count (missing streams return 0), the most common event-sourcing assertion shape.

When to use it

  • Integration tests for event-sourced aggregates.
  • Asserting event append ordering and stream revisions.
  • Verifying projections against a real event log.
  • Not for: unit tests of aggregate logic — mock IEventSourcingRepository in those.

Prerequisites

  • .NET 10 SDK
  • Docker Desktop / Colima (KurrentDB image ~400 MB)
  • KurrentDB.Client 1.3+ (rebranded from EventStore.Client.Grpc.Streams).

Quick start

using Rig.TUnit.Databases.NoSql.KurrentDb.Fixtures;
using Rig.TUnit.Databases.NoSql.KurrentDb.Helpers;
using KurrentDB.Client;

await using var fx = new KurrentDbFixture();
await fx.InitializeAsync();

var stream = "order-42";
await fx.Client.AppendToStreamAsync(
    stream, StreamState.NoStream,
    new[] { new EventData(Uuid.NewUuid(), "placed", payload: "{}"u8.ToArray()) });

Options

Property Type Default Description
Image string "docker.kurrent.io/kurrent-latest/kurrentdb:latest" Image
StartupTimeoutSeconds int 180 KurrentDB warm-up
TlsSkipVerify bool true Dev-mode self-signed cert
RunProjections bool true Enable category / by-event projections

Fixture + helper APIs

  • Rig.TUnit.Databases.NoSql.KurrentDb.Fixtures.KurrentDbFixture
  • Rig.TUnit.Databases.NoSql.KurrentDb.Options.KurrentDbFixtureOptions
  • Rig.TUnit.Databases.NoSql.KurrentDb.Builder.KurrentDbRigBuilder
  • Rig.TUnit.Databases.NoSql.KurrentDb.Assertions.StreamAssert

Per-test isolation

Streams are named {IsolationKey}-{logical-stream-id} so tests cannot collide. No explicit teardown — KurrentDB's persistent log is discarded when the container dies.

Parallelism + performance

  • First-run pull: ~30 s.
  • Warm startup: ~15 s.
  • Per-append: ~2–3 ms.
  • Parallelism: 8+ concurrent tests — stream-level isolation is perfect for it.

Troubleshooting

  • StreamNotFound — the stream name includes {IsolationKey}; check your helper. Missing streams are valid and StreamAssert.EventsAppended Async returns 0, not throws.
  • DEADLINE_EXCEEDED on append — KurrentDB under heavy parallel load may need raised gRPC deadline; configure via KurrentDBClientSettings.

See docs/troubleshooting.md#kurrentdb.

Provider quirks + edge cases

  • Stream names are case-sensitive — Order-42 and order-42 are distinct.
  • StreamState.NoStream is a different optimistic-concurrency token from StreamState.Any; tests asserting on first-append must use the former.
  • Post-rebrand: package + client names changed in v1.x but wire protocol is backward-compatible with EventStoreDB 22+.

Benchmarks

See KurrentDbBenchmarks.cs; baseline in benchmarks/baseline-005.json.

License

MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rig.TUnit.Databases.NoSql.KurrentDb:

Package Downloads
Rig.TUnit.All

Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-beta.2 53 4/27/2026
0.0.0-alpha.0.14 49 4/26/2026