canonical / raft

Unmaintained C implementation of the Raft consensus protocol
Other
940 stars 136 forks source link

test_uv_append: run loop to avoid race. #469

Closed MathieuBordere closed 1 year ago

MathieuBordere commented 1 year ago

In the append/noSpaceUponWrite test, there's a race condition where the prepare step of an open segment is started while the disk is still full, but only completes after the balloon file on disk is removed. After removal of the balloon file it is assumed that the APPEND(5, 64) step succeeds, but the append command is linked to the segment that will fail to prepare due to a full disk, resulting in a test assertion failure.

Running the eventloop a couple of times (hopefully) fixes this race.

codecov[bot] commented 1 year ago

Codecov Report

Merging #469 (57f7555) into master (cc28049) will increase coverage by 0.03%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #469      +/-   ##
==========================================
+ Coverage   76.72%   76.75%   +0.03%     
==========================================
  Files          51       51              
  Lines        9702     9702              
  Branches     2482     2482              
==========================================
+ Hits         7444     7447       +3     
- Misses       1092     1169      +77     
+ Partials     1166     1086      -80     

see 26 files with indirect coverage changes