fix(tiering tests): introduce wait until tieting entries num EQ/GT (#2559)

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-02-14 09:59:11 +02:00 committed by GitHub
parent 4afe278487
commit 7b61b4a8fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 69 additions and 55 deletions

View file

@ -17,6 +17,7 @@
namespace dfly {
using namespace facade;
using namespace std;
class TestConnection : public facade::Connection {
public:
@ -124,6 +125,10 @@ class BaseFamilyTest : public ::testing::Test {
// Wait for a locked key to unlock. Aborts after timeout seconds passed.
void WaitUntilLocked(DbIndex db_index, std::string_view key, double timeout = 3);
// Wait until condition_cb returns true or timeout reached. Returns condition_cb value
bool WaitUntilCondition(std::function<bool()> condition_cb,
std::chrono::milliseconds timeout_ms = 100ms);
std::string GetId() const;
size_t SubscriberMessagesLen(std::string_view conn_id) const;