mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -34,7 +34,7 @@ using namespace util::config;
|
||||
|
||||
struct IntervalSweepHandlerTest : SyncAsioContextTest {
|
||||
protected:
|
||||
constexpr static auto JSONData = R"JSON(
|
||||
static constexpr auto kJSON_DATA = R"JSON(
|
||||
{
|
||||
"dos_guard": {
|
||||
"sweep_interval": 0
|
||||
@@ -42,14 +42,14 @@ protected:
|
||||
}
|
||||
)JSON";
|
||||
|
||||
DOSGuardStrictMock guardMock;
|
||||
DOSGuardStrictMock guardMock_;
|
||||
|
||||
ClioConfigDefinition cfg{{"dos_guard.sweep_interval", ConfigValue{ConfigType::Integer}.defaultValue(0)}};
|
||||
IntervalSweepHandler sweepHandler{cfg, ctx, guardMock};
|
||||
ClioConfigDefinition cfg_{{"dos_guard.sweep_interval", ConfigValue{ConfigType::Integer}.defaultValue(0)}};
|
||||
IntervalSweepHandler sweepHandler_{cfg_, ctx_, guardMock_};
|
||||
};
|
||||
|
||||
TEST_F(IntervalSweepHandlerTest, SweepAfterInterval)
|
||||
{
|
||||
EXPECT_CALL(guardMock, clear()).Times(testing::AtLeast(10));
|
||||
EXPECT_CALL(guardMock_, clear()).Times(testing::AtLeast(10));
|
||||
runContextFor(std::chrono::milliseconds{20});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user