mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Migrate more code into the chrono type system:
Changes include: * Database::tune and all tune overrides * TaggedCache TargetAge * KeyCache TargetAge
This commit is contained in:
committed by
Nik Bougalis
parent
574ea2c14d
commit
d257d1b2c9
@@ -29,6 +29,7 @@ class KeyCache_test : public beast::unit_test::suite
|
||||
public:
|
||||
void run () override
|
||||
{
|
||||
using namespace std::chrono_literals;
|
||||
TestStopwatch clock;
|
||||
clock.set (0);
|
||||
|
||||
@@ -37,7 +38,7 @@ public:
|
||||
|
||||
// Insert an item, retrieve it, and age it so it gets purged.
|
||||
{
|
||||
Cache c ("test", clock, 1, 2);
|
||||
Cache c ("test", clock, 1, 2s);
|
||||
|
||||
BEAST_EXPECT(c.size () == 0);
|
||||
BEAST_EXPECT(c.insert ("one"));
|
||||
@@ -58,7 +59,7 @@ public:
|
||||
|
||||
// Insert two items, have one expire
|
||||
{
|
||||
Cache c ("test", clock, 2, 2);
|
||||
Cache c ("test", clock, 2, 2s);
|
||||
|
||||
BEAST_EXPECT(c.insert ("one"));
|
||||
BEAST_EXPECT(c.size () == 1);
|
||||
@@ -76,7 +77,7 @@ public:
|
||||
|
||||
// Insert three items (1 over limit), sweep
|
||||
{
|
||||
Cache c ("test", clock, 2, 3);
|
||||
Cache c ("test", clock, 2, 3s);
|
||||
|
||||
BEAST_EXPECT(c.insert ("one"));
|
||||
++clock;
|
||||
|
||||
Reference in New Issue
Block a user