FastLeader election takes long time because of the exponential backoff. Currently the time is 60 seconds.
It would be interesting to give the possibility to configure this parameter, like for example for a Server shutdown.
Otherwise, it sometimes takes so long and it has been detected a test failure when executing: org.apache.zookeeper.server.quorum.QuorumPeerMainTest.
This test case waits until 30 seconds and this is smaller than the 60 seconds where the leader election can be waiting for at the moment of shutting down.
Considering the failure during the test case, this issue was considered a possible bug.