mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-15 17:51:06 +00:00
test(server): Run all unit tests with --force_epoll
(#1672)
This commit is contained in:
parent
db3721b6e2
commit
3779837c5f
4 changed files with 19 additions and 1 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -97,6 +97,9 @@ jobs:
|
|||
#GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1
|
||||
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
|
||||
|
||||
echo "Running tests with --force_epoll"
|
||||
FLAGS_force_epoll=true ctest -V -L DFLY
|
||||
|
||||
echo "Running tests with --cluster_mode=emulated"
|
||||
FLAGS_cluster_mode=emulated ctest -V -L DFLY
|
||||
|
||||
|
|
|
@ -577,6 +577,10 @@ TEST_F(DflyEngineTest, Issue742) {
|
|||
}
|
||||
|
||||
TEST_F(DefragDflyEngineTest, TestDefragOption) {
|
||||
if (pp_->GetNextProactor()->GetKind() == util::ProactorBase::EPOLL) {
|
||||
GTEST_SKIP() << "Defragmentation via idle task is only supported in io uring";
|
||||
}
|
||||
|
||||
absl::SetFlag(&FLAGS_mem_defrag_threshold, 0.02);
|
||||
// Fill data into dragonfly and then check if we have
|
||||
// any location in memory to defrag. See issue #448 for details about this.
|
||||
|
|
|
@ -127,7 +127,11 @@ void BaseFamilyTest::SetUpTestSuite() {
|
|||
init_zmalloc_threadlocal(mi_heap_get_backing());
|
||||
|
||||
// TODO: go over all env variables starting with FLAGS_ and make sure they are in the below list.
|
||||
static constexpr const char* kEnvFlags[] = {"cluster_mode", "lock_on_hashtags"};
|
||||
static constexpr const char* kEnvFlags[] = {
|
||||
"cluster_mode",
|
||||
"lock_on_hashtags",
|
||||
"force_epoll",
|
||||
};
|
||||
for (string_view flag : kEnvFlags) {
|
||||
const char* value = getenv(absl::StrCat("FLAGS_", flag).data());
|
||||
if (value != nullptr) {
|
||||
|
|
|
@ -32,6 +32,13 @@ class TieredStorageTest : public BaseFamilyTest {
|
|||
void TieredStorageTest::SetUpTestSuite() {
|
||||
BaseFamilyTest::SetUpTestSuite();
|
||||
SetFlag(&FLAGS_spill_file_prefix, "/tmp/spill");
|
||||
|
||||
auto* force_epoll = absl::FindCommandLineFlag("force_epoll");
|
||||
if (force_epoll->CurrentValue() == "true") {
|
||||
LOG(WARNING) << "Tiered storage only works with io uring, skipping tests.";
|
||||
// Exiting directly, as otherwise EngineShardSet will exit with error status.
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
void TieredStorageTest::FillExternalKeys(unsigned count) {
|
||||
|
|
Loading…
Reference in a new issue