Writers: drop the same-tier dedupe refusal (unreachable), and pin tie order and the registered lister
Two entries of one tier that share an own id are refused when the id is carried, so a refusal at dedupe could never fire. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7a5b64ad88
commit
ca0b62023d
6 changed files with 66 additions and 29 deletions
|
|
@ -204,6 +204,19 @@ namespace GameCult.Caching.Tests
|
|||
}
|
||||
}
|
||||
|
||||
// Entries of one tier that tie are taken in one fixed order: the catalog does not depend on the order they arrive in.
|
||||
[Test]
|
||||
public void EntriesThatTieAreTakenInOneFixedOrder()
|
||||
{
|
||||
var one = Entry("x", "n", "h1", "x");
|
||||
var two = Entry("x", "n", "h2", "x", "y");
|
||||
foreach (var order in new[] { new[] { one, two }, new[] { two, one } })
|
||||
{
|
||||
Assert.That(CultSchemaCatalogEntry.Derive(new[] { Rec("a", "x") }, order, Array.Empty<CultSchemaCatalogEntry>()).Single().ContentHash, Is.EqualTo("h1"));
|
||||
Assert.That(CultSchemaCatalogEntry.Derive(new[] { Rec("a", "x") }, Array.Empty<CultSchemaCatalogEntry>(), order).Single().ContentHash, Is.EqualTo("h1"));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TwoArrivedEntriesThatShareAnOwnIdAndDisagreeOnTheSchemaNameRefuseTheWrite()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue