Skip to content

Commit c8a22c1

Browse files
authored
feat(wal): failoverTest optimization (#1871)
1 parent d0b0bfb commit c8a22c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

s3stream/src/test/java/com/automq/stream/s3/failover/FailoverTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public void test() throws IOException, ExecutionException, InterruptedException,
6161
request.setDevice(path);
6262
request.setVolumeId("test_volume_id");
6363

64-
when(failoverFactory.getWal(any())).thenReturn(BlockWALService.builder(path, 1024 * 1024).nodeId(233).epoch(100).build());
64+
when(failoverFactory.getWal(any())).thenAnswer(s ->
65+
BlockWALService.builder(path, 1024 * 1024).nodeId(233).epoch(100).build());
6566

6667
boolean exceptionThrown = false;
6768
try {

0 commit comments

Comments
 (0)