From 05ca154dfb9ae8b8462a1bc720162f62d2af9576 Mon Sep 17 00:00:00 2001 From: CLFutureX <775523362@qq.com> Date: Tue, 20 Aug 2024 14:15:40 +0800 Subject: [PATCH] feat(wal): failoverTest optimization --- .../test/java/com/automq/stream/s3/failover/FailoverTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s3stream/src/test/java/com/automq/stream/s3/failover/FailoverTest.java b/s3stream/src/test/java/com/automq/stream/s3/failover/FailoverTest.java index 14b4db1e3b..f73d7c652a 100644 --- a/s3stream/src/test/java/com/automq/stream/s3/failover/FailoverTest.java +++ b/s3stream/src/test/java/com/automq/stream/s3/failover/FailoverTest.java @@ -61,7 +61,8 @@ public void test() throws IOException, ExecutionException, InterruptedException, request.setDevice(path); request.setVolumeId("test_volume_id"); - when(failoverFactory.getWal(any())).thenReturn(BlockWALService.builder(path, 1024 * 1024).nodeId(233).epoch(100).build()); + when(failoverFactory.getWal(any())).thenAnswer(s -> + BlockWALService.builder(path, 1024 * 1024).nodeId(233).epoch(100).build()); boolean exceptionThrown = false; try {