![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Concurrency --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Concurrency -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Concurrency" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Concurrency" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Concurrency" />Project file
paket add Rig.TUnit.Concurrency --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Concurrency, 0.1.0-beta.2"
#:package Rig.TUnit.Concurrency@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Concurrency&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Concurrency&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Concurrency + idempotency helpers:
ConcurrencyAssert.TwoWriters,Precondition.IfMatchFails/NotModified,SequenceIdempotencyChecker.
A small toolbox for the three most common concurrency-test shapes:
DbUpdateConcurrencyException, Mongo's MongoWriteException, Cosmos's
412 Precondition Failed, etc.No containers, no dependencies beyond Rig.TUnit.Core — pure harness code.
Rig.TUnit.Parallelism.ParallelIsolationContract for that.using Rig.TUnit.Concurrency;
using Microsoft.EntityFrameworkCore;
await ConcurrencyAssert.TwoWriters(order)
.OneWinsWith<DbUpdateConcurrencyException>(
a => a.TryUpdateAsync(newValue: 1),
b => b.TryUpdateAsync(newValue: 2));
| Property | Type | Default | Description |
|---|---|---|---|
TimeoutPerBranch |
TimeSpan |
10s |
Per-writer deadline in TwoWriters |
ExpectedLosers |
int |
1 |
How many branches should raise the concurrency exception |
PollingInterval |
TimeSpan |
50ms |
Back-off for async sequence checks |
Rig.TUnit.Concurrency.ConcurrencyAssertRig.TUnit.Concurrency.PreconditionRig.TUnit.Concurrency.SequenceIdempotencyCheckerAll helpers are stateless — every call constructs its own harness. Safe under full parallelism.
TwoWriters dispatches two Tasks and observes which throws.TimeoutPerBranch exceeded — one writer blocked indefinitely;
likely a missing cancellation propagation in the code under test.See .
OneWinsWith<TException> catches the first matching exception type
from either branch; if your store wraps the underlying exception,
match the outermost type or use a base class.Precondition.IfMatchFails expects HTTP status 412; some gateways
translate to 409 — pass expectedStatus: HttpStatusCode.Conflict to
override.See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Rig.TUnit.Concurrency:
| 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). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 63 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 66 | 4/26/2026 |