Fix durability test flakyness
Summary: It occurred that part of the durability flakyness test might be that the same durability directory is used always. If the test is run simultaneously on a single system, there will be interference. This might not actually fix all the flakyness :( I also made the `utils::RandomString` function since that's now used in multiple places, tested it etc. Reviewers: buda, dgleich Reviewed By: dgleich Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1020
This commit is contained in:
@@ -111,3 +111,15 @@ TEST(String, EndsWith) {
|
||||
EXPECT_FALSE(EndsWith("memgraph", "GRAPH"));
|
||||
EXPECT_FALSE(EndsWith("memgraph", "the memgraph"));
|
||||
}
|
||||
|
||||
TEST(String, RandomString) {
|
||||
EXPECT_EQ(RandomString(0).size(), 0);
|
||||
EXPECT_EQ(RandomString(1).size(), 1);
|
||||
EXPECT_EQ(RandomString(42).size(), 42);
|
||||
|
||||
std::set<std::string> string_set;
|
||||
for (int i = 0 ; i < 20 ; ++i)
|
||||
string_set.emplace(RandomString(256));
|
||||
|
||||
EXPECT_EQ(string_set.size(), 20);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user