-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: move ReplicaofRejectOnLoad test from pytest into unit tests #4410
Conversation
@@ -821,6 +821,14 @@ TEST_F(DflyEngineTest, StreamMemInfo) { | |||
EXPECT_GT(stream_mem_second, 0); | |||
} | |||
|
|||
TEST_F(DflyEngineTest, ReplicaofRejectOnLoad) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of pytest below checks that:
- on server start we are in loading state
- once we move from loading state to active as we finished loading the file the replica of command success
This unit test is very limited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a lot of tests where we start replica in active state. I don't see any reason to do the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not mind adding an additional test.
@BorysTheDev what's the reason it takes 5 minutes? It's indeed a lot |
I didn't check but I think because of debug populate 8000000 -> save -> load operations |
The debug populate is the most time consuming |
Let's maybe reduce it to 4000000 ? I do not want to optimize this too much, it's not important. This PR, |
I suggest to have 3 tests instead of this one:
|
a21a118
to
0ffdb61
Compare
added test to check that replicaof can't run during the LOADING state