2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-23 18:38:41 +00:00

FetchTypeDef

This commit is contained in:
2026-06-16 16:07:57 +03:00
parent 147572a138
commit 3d0f97ade0
5 changed files with 101 additions and 23 deletions
@@ -49,6 +49,17 @@ public class DeadlockDetectionTests
foreach (var grp in edgeList.GroupBy(e => e.from))
ns[grp.Key].Links = grp.Select(e => ns[e.to]).ToArray();
});
if (mode == DeadlockResolutionMode.NaiveWait)
{
// Node.Links is self-referential at the typedef level. Warm it with the default
// resolver so this test isolates NaiveWait behavior to the resource graph.
var nodeTypeDef = cluster.ServerWarehouse.GetLocalTypeDefByName(typeof(Node).FullName ?? nameof(Node));
if (nodeTypeDef == null)
throw new InvalidOperationException("Node typedef was not registered.");
await cluster.Connection.FetchTypeDef(nodeTypeDef.Id, null);
}
cluster.Connection.DeadlockResolution = mode;
return cluster;
}