|
|
@@ -12,6 +12,7 @@ import org.junit.jupiter.api.Test;
|
|
|
import org.mockito.ArgumentCaptor;
|
|
|
import org.springframework.test.util.ReflectionTestUtils;
|
|
|
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
@@ -128,7 +129,7 @@ class CfcSyncIdempotencyTest {
|
|
|
pending.setSourceType(SOURCE_TYPE);
|
|
|
pending.setSourceId(SOURCE_ID);
|
|
|
pending.setHours(HOURS);
|
|
|
- when(logMapper.selectList(any())).thenReturn(List.of(pending));
|
|
|
+ when(logMapper.selectList(any())).thenReturn(Collections.singletonList(pending));
|
|
|
when(logMapper.selectOne(any())).thenReturn(pending); // 日志已存在 → 走更新分支而非 insert
|
|
|
|
|
|
int ok = service.retryPending();
|