This test starts with a replset of five nodes and then creates network partitions such that one node (node 4) is forced to sync through another (node 2, then after repartitioning a second time node 3). After each partition it ensures the write concern w:5 can be satisfied. The trouble is when all the nodes restart after enabling bridging (which allows for simulated network partitions), a node other than node 0 is briefly elected primary. This causes the write to node 0 to fail. I think adding an assert soon that waits for 0 to be primary again would fix this failure mode.