Skip to content

Commit

Permalink
Amend leak
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Feb 27, 2024
1 parent e2cd1d5 commit f841015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions appsec/src/helper/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class timer {
{
return system_clock::now().time_since_epoch();
}
virtual ~timer() = default;
};

} // namespace dds
3 changes: 2 additions & 1 deletion appsec/tests/helper/rate_limit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class timer : public dds::timer {

return result;
}
~timer() = default;
std::queue<system_clock::duration> responses;
};

Expand All @@ -46,7 +47,7 @@ class rate_limiter : public dds::rate_limiter {

TEST(RateLimitTest, OnlyAllowedMaxPerSecond)
{
auto timer = std::make_unique<mock::timer>();
std::unique_ptr<mock::timer> timer = std::make_unique<mock::timer>();
// Four calls within the same second
timer->responses.push(system_clock::duration(1708963615));

Expand Down

0 comments on commit f841015

Please sign in to comment.