Skip to content

Commit

Permalink
Fix sonar issue on StandaloneProcessPersistServiceTest (#32820)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Sep 9, 2024
1 parent 5adda6d commit af0ab46
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.sql.Statement;
import java.util.Collections;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -59,10 +60,10 @@ void assertKillProcess() throws SQLException {
}

@Test
void assertKillProcessWithNotExistedProcessId() throws SQLException {
void assertKillProcessWithNotExistedProcessId() {
ProcessRegistry processRegistry = mock(ProcessRegistry.class);
when(ProcessRegistry.getInstance()).thenReturn(processRegistry);
when(processRegistry.get("foo_id")).thenReturn(null);
processPersistService.killProcess("foo_id");
assertDoesNotThrow(() -> processPersistService.killProcess("foo_id"));
}
}

0 comments on commit af0ab46

Please sign in to comment.