Skip to content

Commit 93d8a29

Browse files
authored
Merge pull request #612 from cqse/ts/38628_iterative_kotlin_migration_smol_ones
[TS-38628] [TIA Client / TIA Runlistener] Migration to Kotlin
2 parents 23a2877 + a770a9b commit 93d8a29

36 files changed

+1052
-1154
lines changed

agent/src/test/java/com/teamscale/jacoco/agent/testimpact/TestwiseCoverageAgentTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ public void testAccessViaTiaClientAndReportUploadToTeamscale() throws Exception
8686
TiaAgent agent = new TiaAgent(false, HttpUrl.get("http://localhost:" + port));
8787

8888
TestRunWithClusteredSuggestions testRun = agent.startTestRun(availableTests);
89-
assertThat(testRun.getPrioritizedClusters()).hasSize(1);
90-
assertThat(testRun.getPrioritizedClusters().get(0).tests).hasSize(1);
91-
PrioritizableTest test = testRun.getPrioritizedClusters().get(0).tests.get(0);
89+
assertThat(testRun.prioritizedClusters).hasSize(1);
90+
assertThat(testRun.prioritizedClusters.get(0).tests).hasSize(1);
91+
PrioritizableTest test = testRun.prioritizedClusters.get(0).tests.get(0);
9292
assertThat(test.testName).isEqualTo("test2");
9393

9494
RunningTest runningTest = testRun.startTest(test.testName);

impacted-test-engine/src/main/java/com/teamscale/test_impacted/engine/executor/TeamscaleAgentNotifier.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public TeamscaleAgentNotifier(List<ITestwiseCoverageAgentApi> testwiseCoverageAg
3333
public void startTest(String testUniformPath) {
3434
try {
3535
for (ITestwiseCoverageAgentApi apiService : testwiseCoverageAgentApis) {
36-
apiService.testStarted(UrlUtils.percentEncode(testUniformPath)).execute();
36+
apiService.testStarted(UrlUtils.encodeUrl(testUniformPath)).execute();
3737
}
3838
} catch (IOException e) {
3939
LOGGER.log(Level.SEVERE, e, () -> "Error while calling service api.");
@@ -45,9 +45,9 @@ public void endTest(String testUniformPath, TestExecution testExecution) {
4545
try {
4646
for (ITestwiseCoverageAgentApi apiService : testwiseCoverageAgentApis) {
4747
if (testExecution == null) {
48-
apiService.testFinished(UrlUtils.percentEncode(testUniformPath)).execute();
48+
apiService.testFinished(UrlUtils.encodeUrl(testUniformPath)).execute();
4949
} else {
50-
apiService.testFinished(UrlUtils.percentEncode(testUniformPath), testExecution).execute();
50+
apiService.testFinished(UrlUtils.encodeUrl(testUniformPath), testExecution).execute();
5151
}
5252
}
5353
} catch (IOException e) {

system-tests/tia-client-test/src/main/java/testframework/CustomTestFramework.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void runTestsWithTia() throws AgentHttpRequestFailedException {
4444
allTests.keySet().stream().map(name -> new ClusteredTestDetails(name, name, null, null, null))
4545
.collect(toList()));
4646

47-
for (PrioritizableTestCluster cluster : testRun.getPrioritizedClusters()) {
47+
for (PrioritizableTestCluster cluster : testRun.prioritizedClusters) {
4848
for (PrioritizableTest test : cluster.tests) {
4949
Runnable runnable = allTests.get(test.testName);
5050
RunningTest runningTest = testRun.startTest(test.testName);

teamscale-client/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2+
kotlin("jvm")
23
`java-library`
34
com.teamscale.`java-convention`
45
com.teamscale.coverage
56
com.teamscale.publish
6-
kotlin("jvm")
77
}
88

99
publishAs {

tia-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
2+
kotlin("jvm")
23
`java-library`
34
com.teamscale.`java-convention`
45
com.teamscale.coverage

tia-client/src/main/java/com/teamscale/tia.client/AgentCommunicationUtils.java

Lines changed: 0 additions & 55 deletions
This file was deleted.

tia-client/src/main/java/com/teamscale/tia.client/AgentHttpRequestFailedException.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

tia-client/src/main/java/com/teamscale/tia.client/CommandLineInterface.java

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)