![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Databases.NoSql.Cosmos --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Databases.NoSql.Cosmos -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Databases.NoSql.Cosmos" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Databases.NoSql.Cosmos" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Databases.NoSql.Cosmos" />Project file
paket add Rig.TUnit.Databases.NoSql.Cosmos --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Databases.NoSql.Cosmos, 0.1.0-beta.2"
#:package Rig.TUnit.Databases.NoSql.Cosmos@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Databases.NoSql.Cosmos&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Databases.NoSql.Cosmos&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Testcontainers-backed Linux Cosmos emulator fixture with
RuChargeCaptureandPartitionKeyDistributionChecker.
The Rig.TUnit Cosmos DB provider. CosmosFixture spins the
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview
Linux emulator via the generic Testcontainers API (the dedicated
Testcontainers.CosmosDb module targets the legacy Windows emulator —
incompatible, see testcontainers-dotnet#1306). Ships two novel helpers:
RuChargeCapture (per-operation RU budget assertions) and
PartitionKeyDistributionChecker (max-share + normalised Shannon entropy
hot-partition detector).
[Category("cosmos")] auto-skip via runtime
OperatingSystem.IsWindows() guard.Microsoft.Azure.Cosmos 3.x (transitive)using Microsoft.Azure.Cosmos;
using Rig.TUnit.Databases.NoSql.Cosmos.Fixtures;
using Rig.TUnit.Databases.NoSql.Cosmos.Helpers;
await using var fx = new CosmosFixture();
await fx.InitializeAsync();
using var client = new CosmosClient(fx.ConnectionString);
var db = await client.CreateDatabaseIfNotExistsAsync(fx.DatabaseName);
| Property | Type | Default | Description |
|---|---|---|---|
Image |
string |
"mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview" |
Emulator image |
StartupTimeoutSeconds |
int |
300 |
Emulator boot is slow |
DatabaseName |
string |
"rigtunit" |
Default database |
HttpsGatewayPort |
int |
8081 |
Emulator gateway port |
Rig.TUnit.Databases.NoSql.Cosmos.Fixtures.CosmosFixtureRig.TUnit.Databases.NoSql.Cosmos.Options.CosmosFixtureOptionsRig.TUnit.Databases.NoSql.Cosmos.Builder.CosmosRigBuilderRig.TUnit.Databases.NoSql.Cosmos.Helpers.RuChargeCaptureRig.TUnit.Databases.NoSql.Cosmos.Helpers.PartitionKeyDistributionCheckerContainer-per-test (IsolationKey suffix) is cost-prohibitive — the
emulator takes ~2 min to start. Default is one fixture per test-class
with per-test container names (test-cosmos-{IsolationKey}) created via
CreateContainerIfNotExistsAsync and deleted on teardown.
OperatingSystem.IsWindows() returning false. Run the matrix cell on
Linux runners.TransportException — emulator still warming up; fixture waits but
in a busy CI cell the default timeout can be exceeded. Raise
StartupTimeoutSeconds.See .
HttpClient. Do not reuse that handler in
production.RuChargeCapture is thread-safe; aggregate RU budgets across parallel
ops with capture.Total.PartitionKeyDistributionChecker.IsBalanced(keys, threshold) uses
normalised entropy; the default threshold is 0.9 (0=maximally skewed,
1=uniform).See ;
baseline in benchmarks/baseline-005.json. RU-charge assertions are a
common regression vector and are tracked closely.
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.Databases.NoSql.Cosmos:
| 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 | 70 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 63 | 4/26/2026 |