mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-24 02:12:24 +00:00
Improve Companion terminal routing and controls
This commit is contained in:
1 parent
71619934fc
commit
4d51d49660
14 files changed
+709
-72
No files matched your search
@@ -2,6 +2,23 @@
|
||||
|
||||
#include <helpers/RemoteCliReplyCache.h>
|
||||
#include <helpers/RemoteCliRequest.h>
|
||||
#include <helpers/RemoteCliTimeout.h>
|
||||
|
||||
TEST(RemoteCliTimeout, UsesThreeHundredPercentOfRouteEstimate) {
|
||||
uint32_t timeout = 0;
|
||||
|
||||
ASSERT_TRUE(mesh::calculateRemoteCliTimeoutMillis(6218, timeout));
|
||||
EXPECT_EQ(18654UL, timeout);
|
||||
}
|
||||
|
||||
TEST(RemoteCliTimeout, RejectsInvalidOrOverflowingEstimate) {
|
||||
uint32_t timeout = 123;
|
||||
|
||||
EXPECT_FALSE(mesh::calculateRemoteCliTimeoutMillis(0, timeout));
|
||||
EXPECT_EQ(0UL, timeout);
|
||||
EXPECT_FALSE(mesh::calculateRemoteCliTimeoutMillis(0x7FFFFFFFUL, timeout));
|
||||
EXPECT_EQ(0UL, timeout);
|
||||
}
|
||||
|
||||
TEST(RemoteCliReplyCache, ReplaysOnlyTheSameAuthenticatedRequest) {
|
||||
mesh::RemoteCliReplyCache cache;
|
||||
|
||||
Reference in new issue
Block a user