mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[ntcore] Use last received time instead of last ping response
This relaxes the timeout constraint for long message transmissions.
This commit is contained in:
@@ -63,7 +63,7 @@ class MockWireConnection : public WireConnection {
|
||||
MOCK_METHOD(int, Flush, (), (override));
|
||||
|
||||
MOCK_METHOD(uint64_t, GetLastFlushTime, (), (const, override));
|
||||
MOCK_METHOD(uint64_t, GetLastPingResponse, (), (const, override));
|
||||
MOCK_METHOD(uint64_t, GetLastReceivedTime, (), (const, override));
|
||||
|
||||
MOCK_METHOD(void, Disconnect, (std::string_view reason), (override));
|
||||
};
|
||||
|
||||
@@ -181,7 +181,7 @@ TEST_F(ServerImplTest, PublishLocal) {
|
||||
// EXPECT_CALL(wire, Flush()).WillOnce(Return(0)); // AddClient()
|
||||
EXPECT_CALL(setPeriodic, Call(100)); // ClientSubscribe()
|
||||
// EXPECT_CALL(wire, Flush()).WillOnce(Return(0)); // ClientSubscribe()
|
||||
EXPECT_CALL(wire, GetLastPingResponse()).WillOnce(Return(0));
|
||||
EXPECT_CALL(wire, GetLastReceivedTime()).WillOnce(Return(0));
|
||||
EXPECT_CALL(wire, SendPing(100));
|
||||
EXPECT_CALL(wire, Ready()).WillOnce(Return(true)); // SendControl()
|
||||
EXPECT_CALL(
|
||||
@@ -258,7 +258,7 @@ TEST_F(ServerImplTest, ClientSubTopicOnlyThenValue) {
|
||||
// EXPECT_CALL(wire, Flush()).WillOnce(Return(0)); // AddClient()
|
||||
EXPECT_CALL(setPeriodic, Call(100)); // ClientSubscribe()
|
||||
// EXPECT_CALL(wire, Flush()).WillOnce(Return(0)); // ClientSubscribe()
|
||||
EXPECT_CALL(wire, GetLastPingResponse()).WillOnce(Return(0));
|
||||
EXPECT_CALL(wire, GetLastReceivedTime()).WillOnce(Return(0));
|
||||
EXPECT_CALL(wire, SendPing(100));
|
||||
EXPECT_CALL(wire, Ready()).WillOnce(Return(true)); // SendValues()
|
||||
EXPECT_CALL(
|
||||
|
||||
Reference in New Issue
Block a user