feat(batch17): port inbound, header, and service-import client features
This commit is contained in:
@@ -181,6 +181,20 @@ public class ProtocolParserTests
|
||||
Encoding.ASCII.GetString(c.ArgBuf!).ShouldBe("foo 1");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ClientConnection_InboundDispatchAndPingIntervalHelpers_ShouldBehave()
|
||||
{
|
||||
var c = new ClientConnection(ClientKind.Client);
|
||||
var before = DateTime.UtcNow;
|
||||
c.ProcessInboundMsg(Encoding.ASCII.GetBytes("hello"));
|
||||
c.LastIn.ShouldBeGreaterThan(before - TimeSpan.FromMilliseconds(1));
|
||||
|
||||
ClientConnection.AdjustPingInterval(ClientKind.Router, TimeSpan.FromHours(1))
|
||||
.ShouldBeLessThan(TimeSpan.FromHours(1));
|
||||
ClientConnection.AdjustPingInterval(ClientKind.Gateway, TimeSpan.FromHours(1))
|
||||
.ShouldBeLessThan(TimeSpan.FromHours(1));
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// TestParsePub — Go test ID 2602
|
||||
// =====================================================================
|
||||
|
||||
Reference in New Issue
Block a user