Skip to content

Commit

Permalink
test: move ReplicaofRejectOnLoad test from pytest into unit tests (#4410
Browse files Browse the repository at this point in the history
)
  • Loading branch information
BorysTheDev authored Jan 7, 2025
1 parent 21fcf58 commit ed1436b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/server/dragonfly_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,14 @@ TEST_F(DflyEngineTest, StreamMemInfo) {
EXPECT_GT(stream_mem_second, 0);
}

TEST_F(DflyEngineTest, ReplicaofRejectOnLoad) {
service_->SwitchState(GlobalState::ACTIVE, GlobalState::LOADING);

RespExpr res = Run({"REPLICAOF", "localhost", "3779"});

ASSERT_THAT(res, ErrArg("LOADING Dragonfly is loading the dataset in memory"));
}

// TODO: to test transactions with a single shard since then all transactions become local.
// To consider having a parameter in dragonfly engine controlling number of shards
// unconditionally from number of cpus. TO TEST BLPOP under multi for single/multi argument case.
Expand Down

0 comments on commit ed1436b

Please sign in to comment.