From 4d962e29db3c1a423c6092dadf175f0f22784250 Mon Sep 17 00:00:00 2001 From: Constructor Date: Fri, 13 Dec 2024 03:44:21 +0100 Subject: [PATCH] Migrate ImpactedTestEngine mocks to kotlin mocks --- .../executor/ImpactedTestsProvider.java | 121 ------------------ .../engine/executor/ImpactedTestsProvider.kt | 105 +++++++++++++++ .../engine/options/TestEngineOptions.kt | 2 +- .../engine/ImpactedTestEngineTestBase.kt | 21 ++- .../ImpactedTestEngineWithDynamicTestsTest.kt | 20 +-- .../ImpactedTestEngineWithTwoEnginesTest.kt | 65 +++++----- .../engine/NoImpactedTestsTest.kt | 2 - .../engine/executor/SimpleTestDescriptor.kt | 1 - ...CoverageCollectingExecutionListenerTest.kt | 3 - 9 files changed, 156 insertions(+), 184 deletions(-) delete mode 100644 impacted-test-engine/src/main/java/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.java create mode 100644 impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.kt diff --git a/impacted-test-engine/src/main/java/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.java b/impacted-test-engine/src/main/java/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.java deleted file mode 100644 index 537d43fc8..000000000 --- a/impacted-test-engine/src/main/java/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.teamscale.test_impacted.engine.executor; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.teamscale.client.ClusteredTestDetails; -import com.teamscale.client.CommitDescriptor; -import com.teamscale.client.PrioritizableTestCluster; -import com.teamscale.client.TeamscaleClient; -import com.teamscale.test_impacted.commons.LoggerUtils; - -import okhttp3.ResponseBody; -import retrofit2.Response; - -/** - * Class for retrieving the impacted {@link PrioritizableTestCluster}s corresponding to {@link ClusteredTestDetails} - * available for test execution. - */ -public class ImpactedTestsProvider { - - private static final Logger LOGGER = LoggerUtils.getLogger(ImpactedTestsProvider.class); - - private final TeamscaleClient client; - - private final String baseline; - - private final String baselineRevision; - - private final CommitDescriptor endCommit; - - private final String endRevision; - - private final String repository; - - /** - * The partition for the tests provided. - */ - public final String partition; - - private final boolean includeNonImpacted; - - private final boolean includeAddedTests; - - private final boolean includeFailedAndSkipped; - - public ImpactedTestsProvider(TeamscaleClient client, String baseline, String baselineRevision, CommitDescriptor endCommit, String endRevision, String repository, String partition, - boolean includeNonImpacted, boolean includeAddedTests, - boolean includeFailedAndSkipped) { - this.client = client; - this.baseline = baseline; - this.baselineRevision = baselineRevision; - this.endCommit = endCommit; - this.endRevision = endRevision; - this.repository = repository; - this.partition = partition; - this.includeNonImpacted = includeNonImpacted; - this.includeAddedTests = includeAddedTests; - this.includeFailedAndSkipped = includeFailedAndSkipped; - } - - /** Queries Teamscale for impacted tests. */ - public List getImpactedTestsFromTeamscale( - List availableTestDetails) { - try { - LOGGER.info(() -> "Getting impacted tests..."); - Response> response = client - .getImpactedTests(availableTestDetails, baseline, baselineRevision, endCommit, endRevision, repository, - Collections.singletonList(partition), - includeNonImpacted, includeAddedTests, includeFailedAndSkipped); - - if (response.isSuccessful()) { - List testClusters = response.body(); - if (testClusters != null && testCountIsPlausible(testClusters, availableTestDetails)) { - return testClusters; - - } - LOGGER.severe("Teamscale was not able to determine impacted tests:\n" + response.body()); - } else { - LOGGER.severe("Retrieval of impacted tests failed: " + response.code() + " " + response - .message() + "\n" + getErrorBody(response)); - } - } catch (IOException e) { - LOGGER.log(Level.SEVERE, e, () -> "Retrieval of impacted tests failed."); - } - return null; - } - - private static String getErrorBody(Response response) throws IOException { - try (ResponseBody error = response.errorBody()) { - if (error != null) { - return error.string(); - } - } - return ""; - } - - /** - * Checks that the number of tests returned by Teamscale matches the number of available tests when running with - * {@link #includeNonImpacted}. - */ - private boolean testCountIsPlausible(List testClusters, - List availableTestDetails) { - long returnedTests = testClusters.stream().mapToLong(g -> g.tests.size()).sum(); - if (!this.includeNonImpacted) { - LOGGER.info( - () -> "Received " + returnedTests + " impacted tests of " + availableTestDetails.size() + " available tests."); - return true; - } - if (returnedTests == availableTestDetails.size()) { - return true; - } else { - LOGGER.severe( - () -> "Retrieved " + returnedTests + " tests from Teamscale, but expected " + availableTestDetails - .size() + "."); - return false; - } - } -} diff --git a/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.kt b/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.kt new file mode 100644 index 000000000..087b8c151 --- /dev/null +++ b/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/executor/ImpactedTestsProvider.kt @@ -0,0 +1,105 @@ +package com.teamscale.test_impacted.engine.executor + +import com.teamscale.client.ClusteredTestDetails +import com.teamscale.client.CommitDescriptor +import com.teamscale.client.PrioritizableTestCluster +import com.teamscale.client.TeamscaleClient +import com.teamscale.test_impacted.commons.LoggerUtils.createLogger +import retrofit2.Response +import java.io.IOException +import java.util.logging.Level + +/** + * Class for retrieving the impacted [PrioritizableTestCluster]s corresponding to [ClusteredTestDetails] + * available for test execution. + */ +open class ImpactedTestsProvider( + private val client: TeamscaleClient, + private val baseline: String, + private val baselineRevision: String, + private val endCommit: CommitDescriptor, + private val endRevision: String, + private val repository: String, + @JvmField val partition: String, + private val includeNonImpacted: Boolean, + private val includeAddedTests: Boolean, + private val includeFailedAndSkipped: Boolean +) { + private val logger = createLogger() + + /** Queries Teamscale for impacted tests. */ + fun getImpactedTestsFromTeamscale( + availableTestDetails: List + ): List { + try { + logger.info { "Getting impacted tests..." } + val response = client + .getImpactedTests( + availableTestDetails, baseline, baselineRevision, endCommit, endRevision, repository, + listOf(partition), + includeNonImpacted, includeAddedTests, includeFailedAndSkipped + ) + + if (response.isSuccessful) { + val testClusters = response.body() + if (testClusters != null && testCountIsPlausible(testClusters, availableTestDetails)) { + return testClusters + } + logger.severe( + """ + Teamscale was not able to determine impacted tests: + ${response.body()} + """.trimIndent() + ) + } else { + logger.severe( + "Retrieval of impacted tests failed: ${response.code()} ${response.message()}\n${ + getErrorBody(response) + }" + ) + } + } catch (e: IOException) { + logger.log( + Level.SEVERE, e + ) { "Retrieval of impacted tests failed." } + } + return emptyList() + } + + /** + * Checks that the number of tests returned by Teamscale matches the number of available tests when running with + * [.includeNonImpacted]. + */ + private fun testCountIsPlausible( + testClusters: List, + availableTestDetails: List + ): Boolean { + val returnedTests = testClusters.stream().mapToLong { + it.tests!!.size.toLong() + }.sum() + if (!includeNonImpacted) { + logger.info { "Received $returnedTests impacted tests of ${availableTestDetails.size} available tests." } + return true + } + if (returnedTests == availableTestDetails.size.toLong()) { + return true + } else { + logger.severe { + "Retrieved $returnedTests tests from Teamscale, but expected ${availableTestDetails.size}." + } + return false + } + } + + companion object { + @Throws(IOException::class) + private fun getErrorBody(response: Response<*>): String { + response.errorBody().use { error -> + if (error != null) { + return error.string() + } + } + return "" + } + } +} diff --git a/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/options/TestEngineOptions.kt b/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/options/TestEngineOptions.kt index 37c45f861..5bf81ac47 100644 --- a/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/options/TestEngineOptions.kt +++ b/impacted-test-engine/src/main/kotlin/com/teamscale/test_impacted/engine/options/TestEngineOptions.kt @@ -106,7 +106,7 @@ class TestEngineOptions { File(reportDirectory, "server-request.txt") ) return ImpactedTestsProvider( - client, baseline, baselineRevision, endCommit, endRevision, repository, partition, + client, baseline!!, baselineRevision!!, endCommit!!, endRevision!!, repository!!, partition!!, runAllTests, includeAddedTests, includeFailedAndSkipped ) } diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineTestBase.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineTestBase.kt index 09252463f..b46babe4b 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineTestBase.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineTestBase.kt @@ -7,9 +7,8 @@ import com.teamscale.test_impacted.engine.executor.TeamscaleAgentNotifier import org.assertj.core.api.Assertions import org.junit.jupiter.api.Test import org.junit.platform.engine.* -import org.mockito.ArgumentMatchers -import org.mockito.Mockito import org.mockito.Mockito.mock +import org.mockito.kotlin.* /** Base class for testing specific scenarios in the impacted test engine. */ abstract class ImpactedTestEngineTestBase { @@ -30,11 +29,11 @@ abstract class ImpactedTestEngineTestBase { Assertions.assertThat(engineDescriptor.uniqueId) .isEqualTo(UniqueId.forEngine(ImpactedTestEngine.ENGINE_ID)) - Mockito.`when`(executionRequest.engineExecutionListener) + whenever(executionRequest.engineExecutionListener) .thenReturn(executionListener) - Mockito.`when`(executionRequest.rootTestDescriptor) + whenever(executionRequest.rootTestDescriptor) .thenReturn(engineDescriptor) - Mockito.`when`(impactedTestsProvider.getImpactedTestsFromTeamscale(ArgumentMatchers.any())) + whenever(impactedTestsProvider.getImpactedTestsFromTeamscale(any())) .thenReturn(impactedTests) testEngine.execute(executionRequest) @@ -42,11 +41,11 @@ abstract class ImpactedTestEngineTestBase { verifyCallbacks(executionListener) // Ensure test data is written. - Mockito.verify(testDataWriter).dumpTestDetails(ArgumentMatchers.any()) - Mockito.verify(testDataWriter).dumpTestExecutions(ArgumentMatchers.any()) + verify(testDataWriter).dumpTestDetails(any()) + verify(testDataWriter).dumpTestExecutions(any()) - Mockito.verifyNoMoreInteractions(executionListener) - Mockito.verifyNoMoreInteractions(testDataWriter) + verifyNoMoreInteractions(executionListener) + verifyNoMoreInteractions(testDataWriter) } /** Returns the available engines that should be assumed by the impacted test engine. */ @@ -60,10 +59,10 @@ abstract class ImpactedTestEngineTestBase { private fun createInternalImpactedTestEngine(engines: List): InternalImpactedTestEngine { engines.forEach { engine -> - Mockito.`when`(testEngineRegistry.getTestEngine(ArgumentMatchers.eq(engine.id))) + whenever(testEngineRegistry.getTestEngine(eq(engine.id))) .thenReturn(engine) } - Mockito.`when`>(testEngineRegistry.iterator()).thenReturn(engines.iterator()) + whenever>(testEngineRegistry.iterator()).thenReturn(engines.iterator()) return InternalImpactedTestEngine( ImpactedTestEngineConfiguration( diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithDynamicTestsTest.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithDynamicTestsTest.kt index bf086de98..36720890a 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithDynamicTestsTest.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithDynamicTestsTest.kt @@ -6,7 +6,7 @@ import com.teamscale.test_impacted.engine.executor.DummyEngine import com.teamscale.test_impacted.engine.executor.SimpleTestDescriptor import com.teamscale.test_impacted.test_descriptor.JUnitJupiterTestDescriptorResolver import org.junit.platform.engine.* -import org.mockito.Mockito +import org.mockito.kotlin.verify /** Test setup for JUnit Jupiter dynamic tests. */ internal class ImpactedTestEngineWithDynamicTestsTest : ImpactedTestEngineTestBase() { @@ -47,20 +47,20 @@ internal class ImpactedTestEngineWithDynamicTestsTest : ImpactedTestEngineTestBa override fun verifyCallbacks(executionListener: EngineExecutionListener) { // First the parents test descriptors are started in order. - Mockito.verify(executionListener).executionStarted(testRoot) - Mockito.verify(executionListener).executionStarted(dynamicTestClassCase) - Mockito.verify(executionListener).executionStarted(dynamicTestCase) + verify(executionListener).executionStarted(testRoot) + verify(executionListener).executionStarted(dynamicTestClassCase) + verify(executionListener).executionStarted(dynamicTestCase) // Test case is added dynamically and executed. dynamicTestCase.addChild(dynamicallyRegisteredTestCase) - Mockito.verify(executionListener).dynamicTestRegistered(dynamicallyRegisteredTestCase) - Mockito.verify(executionListener).executionStarted(dynamicallyRegisteredTestCase) - Mockito.verify(executionListener) + verify(executionListener).dynamicTestRegistered(dynamicallyRegisteredTestCase) + verify(executionListener).executionStarted(dynamicallyRegisteredTestCase) + verify(executionListener) .executionFinished(dynamicallyRegisteredTestCase, TestExecutionResult.successful()) // Parent test descriptors are also finished. - Mockito.verify(executionListener).executionFinished(dynamicTestCase, TestExecutionResult.successful()) - Mockito.verify(executionListener).executionFinished(dynamicTestClassCase, TestExecutionResult.successful()) - Mockito.verify(executionListener).executionFinished(testRoot, TestExecutionResult.successful()) + verify(executionListener).executionFinished(dynamicTestCase, TestExecutionResult.successful()) + verify(executionListener).executionFinished(dynamicTestClassCase, TestExecutionResult.successful()) + verify(executionListener).executionFinished(testRoot, TestExecutionResult.successful()) } } diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithTwoEnginesTest.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithTwoEnginesTest.kt index a527cab2f..1d80a30c5 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithTwoEnginesTest.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/ImpactedTestEngineWithTwoEnginesTest.kt @@ -6,8 +6,9 @@ import com.teamscale.test_impacted.engine.executor.DummyEngine import com.teamscale.test_impacted.engine.executor.SimpleTestDescriptor import com.teamscale.test_impacted.test_descriptor.JUnitJupiterTestDescriptorResolver import org.junit.platform.engine.* -import org.mockito.ArgumentMatchers -import org.mockito.Mockito +import org.mockito.kotlin.any +import org.mockito.kotlin.eq +import org.mockito.kotlin.verify import java.util.* /** Test setup for a mixture of impacted and no impacted tests and two test engines. */ @@ -68,16 +69,12 @@ internal class ImpactedTestEngineWithTwoEnginesTest : ImpactedTestEngineTestBase private val impactedTestCase1 = SimpleTestDescriptor.testCase(impactedTestCase1Id) private val nonImpactedTestCase1 = SimpleTestDescriptor.testCase(nonImpactedTestCase1Id) - private val firstTestClass = SimpleTestDescriptor.testContainer( - firstTestClassId, - impactedTestCase1, nonImpactedTestCase1 - ) + private val firstTestClass = SimpleTestDescriptor.testContainer(firstTestClassId, impactedTestCase1, nonImpactedTestCase1) private val impactedTestCase2 = SimpleTestDescriptor.testCase(impactedTestCase2Id) private val nonImpactedTestCase2 = SimpleTestDescriptor.testCase(nonImpactedTestCase2Id) private val ignoredTestClass = SimpleTestDescriptor.testContainer( - ignoredTestClassId, - impactedTestCase2, nonImpactedTestCase2 + ignoredTestClassId, impactedTestCase2, nonImpactedTestCase2 ).skip() private val failed = TestExecutionResult.failed(NullPointerException()) @@ -86,7 +83,8 @@ internal class ImpactedTestEngineWithTwoEnginesTest : ImpactedTestEngineTestBase SimpleTestDescriptor.testCase(skippedImpactedTestCaseId).skip() private val secondTestClass = SimpleTestDescriptor.testContainer( secondTestClassId, - impactedTestCase3, skippedImpactedTestCase + impactedTestCase3, + skippedImpactedTestCase ) private val impactedTestCase4 = SimpleTestDescriptor.testCase(impactedTestCase4Id) @@ -129,46 +127,43 @@ internal class ImpactedTestEngineWithTwoEnginesTest : ImpactedTestEngineTestBase override fun verifyCallbacks(executionListener: EngineExecutionListener) { // Start of engine 1 - Mockito.verify(executionListener).executionStarted(testEngine1Root) + verify(executionListener).executionStarted(testEngine1Root) // Execute FirstTestClass. - Mockito.verify(executionListener).executionStarted(firstTestClass) - Mockito.verify(executionListener).executionStarted(impactedTestCase1) - Mockito.verify(executionListener) - .executionFinished(ArgumentMatchers.eq(impactedTestCase1), ArgumentMatchers.any()) - Mockito.verify(executionListener).executionFinished(ArgumentMatchers.eq(firstTestClass), ArgumentMatchers.any()) + verify(executionListener).executionStarted(firstTestClass) + verify(executionListener).executionStarted(impactedTestCase1) + verify(executionListener) + .executionFinished(eq(impactedTestCase1), any()) + verify(executionListener).executionFinished(eq(firstTestClass), any()) // Execute IgnoredTestClass. - Mockito.verify(executionListener).executionStarted(ignoredTestClass) - Mockito.verify(executionListener) - .executionSkipped(ArgumentMatchers.eq(impactedTestCase2), ArgumentMatchers.any()) - Mockito.verify(executionListener).executionFinished(ignoredTestClass, TestExecutionResult.successful()) + verify(executionListener).executionStarted(ignoredTestClass) + verify(executionListener) + .executionSkipped(eq(impactedTestCase2), any()) + verify(executionListener).executionFinished(ignoredTestClass, TestExecutionResult.successful()) // Execute SecondTestClass. - Mockito.verify(executionListener).executionStarted(secondTestClass) - Mockito.verify(executionListener).executionStarted(ArgumentMatchers.eq(impactedTestCase3)) - Mockito.verify(executionListener).executionFinished( - impactedTestCase3, - failed - ) - Mockito.verify(executionListener) - .executionSkipped(ArgumentMatchers.eq(skippedImpactedTestCase), ArgumentMatchers.any()) - Mockito.verify(executionListener).executionFinished(secondTestClass, TestExecutionResult.successful()) + verify(executionListener).executionStarted(secondTestClass) + verify(executionListener).executionStarted(eq(impactedTestCase3)) + verify(executionListener).executionFinished(impactedTestCase3, failed) + verify(executionListener) + .executionSkipped(eq(skippedImpactedTestCase), any()) + verify(executionListener).executionFinished(secondTestClass, TestExecutionResult.successful()) // Finish test engine 1 - Mockito.verify(executionListener).executionFinished(testEngine1Root, TestExecutionResult.successful()) + verify(executionListener).executionFinished(testEngine1Root, TestExecutionResult.successful()) // Start of engine 2 - Mockito.verify(executionListener).executionStarted(testEngine2Root) + verify(executionListener).executionStarted(testEngine2Root) // Execute OtherTestClass. - Mockito.verify(executionListener).executionStarted(otherTestClass) - Mockito.verify(executionListener).executionStarted(impactedTestCase4) - Mockito.verify(executionListener).executionFinished(impactedTestCase4, TestExecutionResult.successful()) - Mockito.verify(executionListener).executionFinished(otherTestClass, TestExecutionResult.successful()) + verify(executionListener).executionStarted(otherTestClass) + verify(executionListener).executionStarted(impactedTestCase4) + verify(executionListener).executionFinished(impactedTestCase4, TestExecutionResult.successful()) + verify(executionListener).executionFinished(otherTestClass, TestExecutionResult.successful()) // Finish test engine 2 - Mockito.verify(executionListener).executionFinished(testEngine2Root, TestExecutionResult.successful()) + verify(executionListener).executionFinished(testEngine2Root, TestExecutionResult.successful()) } companion object { diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/NoImpactedTestsTest.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/NoImpactedTestsTest.kt index 7e5bbd385..10e4b5897 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/NoImpactedTestsTest.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/NoImpactedTestsTest.kt @@ -5,8 +5,6 @@ import com.teamscale.test_impacted.engine.executor.DummyEngine import com.teamscale.test_impacted.engine.executor.SimpleTestDescriptor import com.teamscale.test_impacted.test_descriptor.JUnitJupiterTestDescriptorResolver import org.junit.platform.engine.EngineExecutionListener -import org.junit.platform.engine.TestDescriptor -import org.junit.platform.engine.TestEngine import org.junit.platform.engine.UniqueId /** Test setup where no test is impacted. */ diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/SimpleTestDescriptor.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/SimpleTestDescriptor.kt index 37a10d12d..a31da433e 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/SimpleTestDescriptor.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/SimpleTestDescriptor.kt @@ -4,7 +4,6 @@ import org.junit.platform.engine.TestDescriptor import org.junit.platform.engine.TestExecutionResult import org.junit.platform.engine.UniqueId import org.junit.platform.engine.support.descriptor.AbstractTestDescriptor -import java.util.* /** A basic implementation of a [TestDescriptor] that can be used during tests. */ class SimpleTestDescriptor private constructor( diff --git a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/TestwiseCoverageCollectingExecutionListenerTest.kt b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/TestwiseCoverageCollectingExecutionListenerTest.kt index 58e74ccd8..75c884498 100644 --- a/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/TestwiseCoverageCollectingExecutionListenerTest.kt +++ b/impacted-test-engine/src/test/kotlin/com/teamscale/test_impacted/engine/executor/TestwiseCoverageCollectingExecutionListenerTest.kt @@ -13,11 +13,8 @@ import java.util.* /** Tests for [TestwiseCoverageCollectingExecutionListener]. */ internal class TestwiseCoverageCollectingExecutionListenerTest { - private val mockApi = mock() - private val resolver = mock() - private val executionListenerMock = mock() private val executionListener = TestwiseCoverageCollectingExecutionListener(