test(mesh): pin the Dps no-ClusterClient guard; bound the channel-share test's blackhole worst case
This commit is contained in:
+8
-1
@@ -735,11 +735,12 @@ public class CentralCommunicationActorTests : ControlPlaneActorTestBase
|
||||
var factory = NewInMemoryDbFactory();
|
||||
SeedGrpcCluster(factory, "C1", ("host-a:4053", "host-a", 4056, true, false));
|
||||
var psk = new RecordingPskProvider();
|
||||
var clients = new RecordingClientFactory(() => CreateTestProbe());
|
||||
|
||||
Sys.ActorOf(CentralCommunicationActor.Props(
|
||||
factory,
|
||||
new MeshTransportOptions { Mode = mode, ContactRefreshSeconds = 60 },
|
||||
new RecordingClientFactory(() => CreateTestProbe()),
|
||||
clients,
|
||||
() => null,
|
||||
new RecordingDialer(),
|
||||
psk));
|
||||
@@ -748,6 +749,12 @@ public class CentralCommunicationActorTests : ControlPlaneActorTestBase
|
||||
() => psk.KnownClusterPublications.Count >= 1, TimeSpan.FromSeconds(5));
|
||||
psk.KnownClusterPublications[0].ShouldBe(new[] { "C1" });
|
||||
psk.InvalidateAllCount.ShouldBeGreaterThanOrEqualTo(1);
|
||||
|
||||
// The one load-bearing line the publication itself cannot witness: with the refresh
|
||||
// timer now running in every mode, only the ClusterClient branch may construct clients.
|
||||
// With rows seeded, deleting the !_useClusterClient guard turns this red for Dps/Grpc.
|
||||
if (mode != MeshTransportOptions.ModeClusterClient)
|
||||
clients.Calls.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+3
-1
@@ -198,7 +198,9 @@ public sealed class MeshGrpcCommandDialerTests
|
||||
// ports on central long before anything else notices.
|
||||
var dialer = new MeshGrpcCommandDialer(
|
||||
new FakePskProvider(("SITE-A", "psk-site-a")),
|
||||
Options.Create(new MeshTransportOptions { DispatchTimeoutSeconds = 5 }),
|
||||
// 1 s, not 5: on a host that blackholes loopback instead of refusing, each dial costs
|
||||
// the full deadline — keep the worst case bounded so this never reads as a hang.
|
||||
Options.Create(new MeshTransportOptions { DispatchTimeoutSeconds = 1 }),
|
||||
NullLogger<MeshGrpcCommandDialer>.Instance);
|
||||
|
||||
// Nothing is listening, so both dials fail — irrelevant here: the channel is constructed
|
||||
|
||||
Reference in New Issue
Block a user