From 1b41a119fa14345a0d94eef26838412d01f4663c Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Mon, 27 Nov 2023 11:02:28 -0500 Subject: [PATCH] More raft_fixture_disk_write_fault in the tests Signed-off-by: Cole Miller --- test/integration/test_replication.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/test_replication.c b/test/integration/test_replication.c index 3d285e621..73d71d522 100644 --- a/test/integration/test_replication.c +++ b/test/integration/test_replication.c @@ -1090,7 +1090,7 @@ TEST(replication, diskWriteFailure, setUp, tearDown, 0, NULL) req->data = (void *)(intptr_t)RAFT_IOERR; BOOTSTRAP_START_AND_ELECT; - CLUSTER_IO_FAULT(0, 1, 1); + raft_fixture_disk_write_fault(&f->cluster, 0, 0); CLUSTER_APPLY_ADD_X(0, req, 1, applyAssertStatusCb); /* The leader steps down when its disk write fails. */ CLUSTER_STEP_UNTIL_STATE_IS(0, RAFT_FOLLOWER, 2000); @@ -1198,7 +1198,7 @@ TEST(replication, failPersistBarrier, setUp, tearDown, 0, NULL) CLUSTER_GROW; /* Server 0 will fail to persist entry 2, a barrier */ - CLUSTER_IO_FAULT(0, 10, 1); + raft_fixture_disk_write_fault(&f->cluster, 0, 0); /* Server 0 gets elected and creates a barrier entry at index 2 */ CLUSTER_BOOTSTRAP; @@ -1220,8 +1220,8 @@ TEST(replication, failPersistBarrierFollower, setUp, tearDown, 0, NULL) CLUSTER_GROW; /* The servers will fail to persist entry 2, a barrier */ - CLUSTER_IO_FAULT(1, 7, 1); - CLUSTER_IO_FAULT(2, 7, 1); + raft_fixture_disk_write_fault(&f->cluster, 1, 0); + raft_fixture_disk_write_fault(&f->cluster, 2, 0); /* Server 0 gets elected and creates a barrier entry at index 2 */ CLUSTER_BOOTSTRAP;