This test is more susceptible to replSetStepDown failing to acquire the ReplicationStateTransition lock because it sets a low (one second) stepDownSecs.
We should increase the stepDownSecs to prevent this issue, keeping in mind not to set it too high, since this test calls replSetStepDown many times and needs to wait for the same node to transition back to primary.
Another solution would be to manually step up a primary. Proposed by max.hirschhorn here. Like this: