From e0075217b7e6a6102b03cd132eb34b85d047a852 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 04:21:48 +0200 Subject: [PATCH] Networking test: the outside-the-shard fixture is written to the cache, since the database refuses it Co-Authored-By: Claude Sonnet 5.5 --- tests/GameCult.Networking.Tests/NetworkingTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/GameCult.Networking.Tests/NetworkingTests.cs b/tests/GameCult.Networking.Tests/NetworkingTests.cs index d9ee9704..1c849fd7 100644 --- a/tests/GameCult.Networking.Tests/NetworkingTests.cs +++ b/tests/GameCult.Networking.Tests/NetworkingTests.cs @@ -4212,13 +4212,13 @@ namespace GameCult.Networking.Tests Schema = "tests.networking_note.v1", Text = "two" }); - // Outside the shard's key prefix: must reach the non-shard snapshot but never the + // Outside the shard's key prefix (written to the cache directly: the database refuses a write no shard owns): must reach the non-shard snapshot but never the // shard-scoped one, so an unfiltered request still proves shard membership is enforced. - await database.PutAsync(new CultRecordKey("other-note:outside-shard"), new NetworkSchemaNote + await cache.UpsertAsync(new NetworkSchemaNote { Schema = "tests.networking_note.v1", Text = "outside" - }); + }, new CultRecordHandle(new CultRecordKey("other-note:outside-shard"))); var nonShard = registry.CreateRawSnapshotResponse(cache, "snapshot-nonshard-unfiltered", filter: null); var shardScoped = database.CreateShardSnapshotResponse(shard, "snapshot-shard-unfiltered", filter: null);