baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.84k stars 862 forks source link

support diasble election in unit-test #453

Open JayiceZ opened 1 month ago

JayiceZ commented 1 month ago

fix:: https://github.com/baidu/braft/issues/445

In unit-test, we should temporarily disable followers' election before stop the leader to ensure that the raft group will be no-leader state for a period of time deterministically