aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-11-06 15:55:39 +0100
committerGitHub <[email protected]>2023-11-06 15:55:39 +0100
commit5295c9618cbae2bb937e188c072f66a77d793eb5 (patch)
tree6aeca701b20af5745eb7924c901c9708c098199b /src/zencore/include
parentstatsd for cas (#511) (diff)
downloadzen-5295c9618cbae2bb937e188c072f66a77d793eb5.tar.xz
zen-5295c9618cbae2bb937e188c072f66a77d793eb5.zip
gc v2 tests (#512)
* set MaxBlockCount at init * properly calculate total size * basic blockstore compact blocks test * correct detection of block swap * Use one implementation for CreateRandomBlob * reduce some data sets to increase speed of tests * reduce test time * rename BlockStoreCompactState::AddBlock -> BlockStoreCompactState::IncludeBlock
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/testutils.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zencore/include/zencore/testutils.h b/src/zencore/include/zencore/testutils.h
index 04648c6de..f5526945a 100644
--- a/src/zencore/include/zencore/testutils.h
+++ b/src/zencore/include/zencore/testutils.h
@@ -2,7 +2,10 @@
#pragma once
-#include <filesystem>
+#if ZEN_WITH_TESTS
+
+# include <zencore/iobuffer.h>
+# include <filesystem>
namespace zen {
@@ -29,4 +32,8 @@ struct ScopedCurrentDirectoryChange
~ScopedCurrentDirectoryChange() { std::filesystem::current_path(OldPath); }
};
+IoBuffer CreateRandomBlob(uint64_t Size);
+
} // namespace zen
+
+#endif // ZEN_WITH_TESTS