Skip to content

Commit 7d5c3ce

Browse files
committed
Refactor is_new test
Now that meta_fd is a part of the state, repeated calls to ra_server:init() lead to different initial states, so the test is adjusted not to expect the same result from both calls.
1 parent 27cb5c6 commit 7d5c3ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/ra_server_SUITE.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,10 +1998,9 @@ is_new(_Config) ->
19981998
log_init_args => #{uid => <<>>},
19991999
machine => {simple, fun erlang:'+'/2, 0}},
20002000
NewState = ra_server:init(Args),
2001+
true = ra_server:is_new(NewState),
20012002
{leader, State, _} = ra_server:handle_leader(usr_cmd(1), NewState),
20022003
false = ra_server:is_new(State),
2003-
NewState = ra_server:init(Args),
2004-
true = ra_server:is_new(NewState),
20052004
ok.
20062005

20072006
command(_Config) ->

0 commit comments

Comments
 (0)