From 1bf473e70d9374b659a481a595a1a5063470e0fc Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Mon, 24 May 2021 20:00:51 +0200 Subject: [PATCH] build: update kotlin to 1.5.10 and remove warnings --- buildSrc/src/main/kotlin/Versions.kt | 4 ++-- common/src/main/kotlin/flank/common/Os.kt | 2 +- corellium/adapter/build.gradle.kts | 2 -- .../corellium/adapter/ExecuteAndroidTestPlan.kt | 2 +- .../corellium/adapter/InvokeAndroidDevices.kt | 2 +- .../main/kotlin/flank/corellium/client/core/Api.kt | 2 +- .../flank/corellium/shard/CalculateShardsTest.kt | 6 +++--- flank-scripts/build.gradle.kts | 2 +- .../flank/scripts/ops/common/GenerateChangeLog.kt | 14 +++++++------- .../ops/integrationtests/common/ITResult.kt | 4 ++-- .../kotlin/flank/scripts/utils/VersionParseTest.kt | 2 +- .../test/kotlin/integration/CustomShardingIT.kt | 4 ++-- .../src/test/kotlin/integration/MultipleApksIT.kt | 4 ++-- .../test/kotlin/integration/MultipleDevicesIT.kt | 4 ++-- .../src/test/kotlin/utils/OutputHelper.kt | 2 +- test_runner/build.gradle.kts | 3 ++- .../src/main/kotlin/ftl/args/AndroidArgs.kt | 2 +- test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt | 2 +- .../src/main/kotlin/ftl/args/CreateCommonArgs.kt | 4 ++-- test_runner/src/main/kotlin/ftl/args/IosArgs.kt | 2 +- .../client/junit/CreateTestSuiteOverviewData.kt | 2 +- .../kotlin/ftl/reports/output/OutputReportType.kt | 2 +- .../src/main/kotlin/ftl/run/status/OutputStyle.kt | 6 ++++-- .../src/main/kotlin/ftl/shard/ShardCount.kt | 2 +- test_runner/src/main/kotlin/ftl/util/Utils.kt | 2 +- test_runner/src/test/kotlin/ftl/shard/ShardTest.kt | 6 +++--- 26 files changed, 45 insertions(+), 44 deletions(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 316d5b6d13..aa4d8cd410 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -26,10 +26,10 @@ object Versions { const val APK_PARSER = "2.6.10" // match to Tools -> Kotlin -> Configure Kotlin Plugin Updates -> Update Channel: Stable - const val KOTLIN = "1.4.32" + const val KOTLIN = "1.5.10" // https://github.com/Kotlin/kotlinx.coroutines/releases - const val KOTLIN_COROUTINES = "1.4.3" + const val KOTLIN_COROUTINES = "1.5.0" // https://github.com/remkop/picocli/releases const val PICOCLI = "4.6.1" diff --git a/common/src/main/kotlin/flank/common/Os.kt b/common/src/main/kotlin/flank/common/Os.kt index 75bb6f8330..0bcb75b91e 100644 --- a/common/src/main/kotlin/flank/common/Os.kt +++ b/common/src/main/kotlin/flank/common/Os.kt @@ -1,6 +1,6 @@ package flank.common -private val osName = System.getProperty("os.name")?.toLowerCase() ?: "" +private val osName = System.getProperty("os.name")?.lowercase() ?: "" val isMacOS: Boolean by lazy { val isMacOS = osName.indexOf("mac") >= 0 diff --git a/corellium/adapter/build.gradle.kts b/corellium/adapter/build.gradle.kts index 490625de93..c1588f02b3 100644 --- a/corellium/adapter/build.gradle.kts +++ b/corellium/adapter/build.gradle.kts @@ -5,9 +5,7 @@ plugins { } repositories { - jcenter() mavenCentral() - maven(url = "https://kotlin.bintray.com/kotlinx") } tasks.withType { kotlinOptions.jvmTarget = "1.8" } diff --git a/corellium/adapter/src/main/kotlin/flank/corellium/adapter/ExecuteAndroidTestPlan.kt b/corellium/adapter/src/main/kotlin/flank/corellium/adapter/ExecuteAndroidTestPlan.kt index 2fa8914eb1..cd85e6abd3 100644 --- a/corellium/adapter/src/main/kotlin/flank/corellium/adapter/ExecuteAndroidTestPlan.kt +++ b/corellium/adapter/src/main/kotlin/flank/corellium/adapter/ExecuteAndroidTestPlan.kt @@ -12,7 +12,7 @@ import kotlinx.coroutines.launch val executeAndroidTestPlan = AndroidTestPlan.Execute { config -> config.instances.map { (instanceId, commands: List) -> - channelFlow { + channelFlow { println("Getting console $instanceId") corellium.connectConsole(instanceId).apply { clear() diff --git a/corellium/adapter/src/main/kotlin/flank/corellium/adapter/InvokeAndroidDevices.kt b/corellium/adapter/src/main/kotlin/flank/corellium/adapter/InvokeAndroidDevices.kt index 23fb054547..192bedfb31 100644 --- a/corellium/adapter/src/main/kotlin/flank/corellium/adapter/InvokeAndroidDevices.kt +++ b/corellium/adapter/src/main/kotlin/flank/corellium/adapter/InvokeAndroidDevices.kt @@ -21,7 +21,7 @@ private const val SCREEN = "720x1280:280" fun invokeAndroidDevices( projectName: String, ) = AndroidInstance.Invoke { (amount) -> - channelFlow { + channelFlow { val projectId = getProjectId(projectName) val instances = getCreatedInstances(projectId, amount) startNotRunningInstances(instances) diff --git a/corellium/client/src/main/kotlin/flank/corellium/client/core/Api.kt b/corellium/client/src/main/kotlin/flank/corellium/client/core/Api.kt index 85fdc2db89..4e5e0594f2 100644 --- a/corellium/client/src/main/kotlin/flank/corellium/client/core/Api.kt +++ b/corellium/client/src/main/kotlin/flank/corellium/client/core/Api.kt @@ -156,7 +156,7 @@ suspend fun Corellium.getVPNConfig( ) { val response: HttpResponse = withRetry { client.get { - url("$urlBase/projects/$projectId/vpn-configs/$id.${type.name.toLowerCase()}") + url("$urlBase/projects/$projectId/vpn-configs/$id.${type.name.lowercase()}") header("Authorization", token) } } diff --git a/corellium/shard/calculate/src/test/kotlin/flank/corellium/shard/CalculateShardsTest.kt b/corellium/shard/calculate/src/test/kotlin/flank/corellium/shard/CalculateShardsTest.kt index 51f6a3399d..8a0dd9a68d 100644 --- a/corellium/shard/calculate/src/test/kotlin/flank/corellium/shard/CalculateShardsTest.kt +++ b/corellium/shard/calculate/src/test/kotlin/flank/corellium/shard/CalculateShardsTest.kt @@ -91,9 +91,9 @@ private fun List>.printShards() { private fun List>.verifyDurationEqual() { map { - it.sumByDouble { - it.tests.sumByDouble { - it.cases.sumByDouble { + it.sumOf { + it.tests.sumOf { + it.cases.sumOf { it.duration.toDouble() } } diff --git a/flank-scripts/build.gradle.kts b/flank-scripts/build.gradle.kts index 5a46580751..ee63d89230 100644 --- a/flank-scripts/build.gradle.kts +++ b/flank-scripts/build.gradle.kts @@ -26,7 +26,7 @@ shadowJar.apply { } } // .. -version = "1.9.15" +version = "1.9.16" group = "com.github.flank" application { diff --git a/flank-scripts/src/main/kotlin/flank/scripts/ops/common/GenerateChangeLog.kt b/flank-scripts/src/main/kotlin/flank/scripts/ops/common/GenerateChangeLog.kt index 6fc5a0d2e4..0b3249f8ae 100644 --- a/flank-scripts/src/main/kotlin/flank/scripts/ops/common/GenerateChangeLog.kt +++ b/flank-scripts/src/main/kotlin/flank/scripts/ops/common/GenerateChangeLog.kt @@ -58,13 +58,13 @@ private fun GithubPullRequest.toReleaseNoteMessage() = } internal fun String.mapPrTitleWithType() = when { - startsWith("feat") -> "Features" to skipConventionalCommitPrefix().capitalize() - startsWith("fix") -> "Bug Fixes" to skipConventionalCommitPrefix().capitalize() - startsWith("docs") -> "Documentation" to skipConventionalCommitPrefix().capitalize() - startsWith("refactor") -> "Refactor" to skipConventionalCommitPrefix().capitalize() - startsWith("ci") -> "CI Changes" to skipConventionalCommitPrefix().capitalize() - startsWith("test") -> "Tests update" to skipConventionalCommitPrefix().capitalize() - startsWith("perf") -> "Performance upgrade" to skipConventionalCommitPrefix().capitalize() + startsWith("feat") -> "Features" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("fix") -> "Bug Fixes" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("docs") -> "Documentation" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("refactor") -> "Refactor" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("ci") -> "CI Changes" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("test") -> "Tests update" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } + startsWith("perf") -> "Performance upgrade" to skipConventionalCommitPrefix().replaceFirstChar { it.uppercase() } else -> null // we do not accept other prefix to have update in release notes } diff --git a/flank-scripts/src/main/kotlin/flank/scripts/ops/integrationtests/common/ITResult.kt b/flank-scripts/src/main/kotlin/flank/scripts/ops/integrationtests/common/ITResult.kt index 40647487e7..d3e5928250 100644 --- a/flank-scripts/src/main/kotlin/flank/scripts/ops/integrationtests/common/ITResult.kt +++ b/flank-scripts/src/main/kotlin/flank/scripts/ops/integrationtests/common/ITResult.kt @@ -15,6 +15,6 @@ enum class ITResult { object ITResultSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("ITResult", PrimitiveKind.STRING) - override fun deserialize(decoder: Decoder) = ITResult.valueOf(decoder.decodeString().toUpperCase()) - override fun serialize(encoder: Encoder, value: ITResult) = encoder.encodeString(value.name.toLowerCase()) + override fun deserialize(decoder: Decoder) = ITResult.valueOf(decoder.decodeString().uppercase()) + override fun serialize(encoder: Encoder, value: ITResult) = encoder.encodeString(value.name.lowercase()) } diff --git a/flank-scripts/src/test/kotlin/flank/scripts/utils/VersionParseTest.kt b/flank-scripts/src/test/kotlin/flank/scripts/utils/VersionParseTest.kt index b71e8f785e..afa3287ed6 100644 --- a/flank-scripts/src/test/kotlin/flank/scripts/utils/VersionParseTest.kt +++ b/flank-scripts/src/test/kotlin/flank/scripts/utils/VersionParseTest.kt @@ -43,7 +43,7 @@ class VersionParseTest( sealed class Compare(private val lambda: (Int) -> Boolean) { operator fun invoke(int: Int) = lambda(int) - fun name() = this::class.simpleName?.toUpperCase() ?: "" + fun name() = this::class.simpleName?.uppercase() ?: "" override fun toString() = name() } diff --git a/integration_tests/src/test/kotlin/integration/CustomShardingIT.kt b/integration_tests/src/test/kotlin/integration/CustomShardingIT.kt index de54b66037..22d34798c3 100644 --- a/integration_tests/src/test/kotlin/integration/CustomShardingIT.kt +++ b/integration_tests/src/test/kotlin/integration/CustomShardingIT.kt @@ -101,8 +101,8 @@ class CustomShardingIT { .map { it.testAxises } .flatten() - assertThat(testsResults.sumBy { it.suiteOverview.failures }).isEqualTo(5) - assertThat(testsResults.sumBy { it.suiteOverview.total }).isEqualTo(41) + assertThat(testsResults.sumOf { it.suiteOverview.failures }).isEqualTo(5) + assertThat(testsResults.sumOf { it.suiteOverview.total }).isEqualTo(41) } } diff --git a/integration_tests/src/test/kotlin/integration/MultipleApksIT.kt b/integration_tests/src/test/kotlin/integration/MultipleApksIT.kt index d0b2ada63a..d2b2323213 100644 --- a/integration_tests/src/test/kotlin/integration/MultipleApksIT.kt +++ b/integration_tests/src/test/kotlin/integration/MultipleApksIT.kt @@ -69,7 +69,7 @@ class MultipleApksIT { .map { it.testAxises } .flatten() - assertThat(testsResults.sumBy { it.suiteOverview.failures }).isEqualTo(5) - assertThat(testsResults.sumBy { it.suiteOverview.total }).isEqualTo(41) + assertThat(testsResults.sumOf { it.suiteOverview.failures }).isEqualTo(5) + assertThat(testsResults.sumOf { it.suiteOverview.total }).isEqualTo(41) } } diff --git a/integration_tests/src/test/kotlin/integration/MultipleDevicesIT.kt b/integration_tests/src/test/kotlin/integration/MultipleDevicesIT.kt index 9a1937c478..13262cf703 100644 --- a/integration_tests/src/test/kotlin/integration/MultipleDevicesIT.kt +++ b/integration_tests/src/test/kotlin/integration/MultipleDevicesIT.kt @@ -48,7 +48,7 @@ class MultipleDevicesIT { .map { it.testAxises } .flatten() - assertThat(testsResults.sumBy { it.suiteOverview.failures }).isEqualTo(15) - assertThat(testsResults.sumBy { it.suiteOverview.total }).isEqualTo(123) + assertThat(testsResults.sumOf { it.suiteOverview.failures }).isEqualTo(15) + assertThat(testsResults.sumOf { it.suiteOverview.total }).isEqualTo(123) } } diff --git a/integration_tests/src/test/kotlin/utils/OutputHelper.kt b/integration_tests/src/test/kotlin/utils/OutputHelper.kt index 243c81ddc7..57f2a37f2e 100644 --- a/integration_tests/src/test/kotlin/utils/OutputHelper.kt +++ b/integration_tests/src/test/kotlin/utils/OutputHelper.kt @@ -22,7 +22,7 @@ fun TestSuites.assertTestResultContainsWebLinks() = } fun TestSuites.assertCountOfSkippedTests(expectedCount: Int) = - assertEquals(expectedCount, testSuites.sumBy { it.skipped }) + assertEquals(expectedCount, testSuites.sumOf { it.skipped }) fun TestSuites.assertCountOfFailedTests(expectedCount: Int) = assertEquals(expectedCount, testSuites.count { it.failures > 0 }) diff --git a/test_runner/build.gradle.kts b/test_runner/build.gradle.kts index 25addffbb6..ef4242a08e 100644 --- a/test_runner/build.gradle.kts +++ b/test_runner/build.gradle.kts @@ -128,7 +128,7 @@ signing { // http://www.eclemma.org/jacoco/ jacoco { - toolVersion = "0.8.6" + toolVersion = "0.8.7" } tasks.jacocoTestReport { @@ -194,6 +194,7 @@ dependencies { implementation(Dependencies.KTOR_GSON) implementation(Dependencies.KOTLIN_COROUTINES_CORE) + implementation(Dependencies.KOTLIN_REFLECT) implementation(Dependencies.LOGBACK) diff --git a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt index 222d48d736..d9738d84f6 100644 --- a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt @@ -121,7 +121,7 @@ AndroidArgs run-timeout: $runTimeout legacy-junit-result: $useLegacyJUnitResult ignore-failed-tests: $ignoreFailedTests - output-style: ${outputStyle.name.toLowerCase()} + output-style: ${outputStyle.name.lowercase()} disable-results-upload: $disableResultsUpload default-class-test-time: $defaultClassTestTime disable-usage-statistics: $disableUsageStatistics diff --git a/test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt b/test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt index 1a321e8235..7be2f919f8 100644 --- a/test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt +++ b/test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt @@ -183,7 +183,7 @@ object ArgsHelper { return bucket } - fun getDefaultProjectIdOrNull() = (if (useMock) "mock-project-id" else getUserProjectId())?.toLowerCase() + fun getDefaultProjectIdOrNull() = (if (useMock) "mock-project-id" else getUserProjectId())?.lowercase() // Allow users control over project by checking using Google's logic first before falling back to JSON. private fun getUserProjectId(): String? = fromUserProvidedCredentials() diff --git a/test_runner/src/main/kotlin/ftl/args/CreateCommonArgs.kt b/test_runner/src/main/kotlin/ftl/args/CreateCommonArgs.kt index c0de5e4207..96084ad97c 100644 --- a/test_runner/src/main/kotlin/ftl/args/CreateCommonArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/CreateCommonArgs.kt @@ -16,7 +16,7 @@ fun CommonConfig.createCommonArgs( // gcloud devices = gcloud::devices.require(), resultsBucket = ArgsHelper.createGcsBucket( - projectId = flank::project.require().toLowerCase(), + projectId = flank::project.require().lowercase(), bucket = gcloud::resultsBucket.require() ), resultsDir = gcloud.resultsDir ?: uniqueObjectName(), @@ -42,7 +42,7 @@ fun CommonConfig.createCommonArgs( testTargetsAlwaysRun = flank::testTargetsAlwaysRun.require(), runTimeout = flank::runTimeout.require(), fullJUnitResult = flank::fullJUnitResult.require(), - project = flank::project.require().toLowerCase(), + project = flank::project.require().lowercase(), outputStyle = outputStyle, keepFilePath = flank::keepFilePath.require(), ignoreFailedTests = flank::ignoreFailedTests.require(), diff --git a/test_runner/src/main/kotlin/ftl/args/IosArgs.kt b/test_runner/src/main/kotlin/ftl/args/IosArgs.kt index a7b304bac0..9520fcb15a 100644 --- a/test_runner/src/main/kotlin/ftl/args/IosArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/IosArgs.kt @@ -92,7 +92,7 @@ IosArgs local-result-dir: $localResultDir run-timeout: $runTimeout ignore-failed-tests: $ignoreFailedTests - output-style: ${outputStyle.name.toLowerCase()} + output-style: ${outputStyle.name.lowercase()} disable-results-upload: $disableResultsUpload default-class-test-time: $defaultClassTestTime disable-usage-statistics: $disableUsageStatistics diff --git a/test_runner/src/main/kotlin/ftl/client/junit/CreateTestSuiteOverviewData.kt b/test_runner/src/main/kotlin/ftl/client/junit/CreateTestSuiteOverviewData.kt index 97564c0263..3f948e5125 100644 --- a/test_runner/src/main/kotlin/ftl/client/junit/CreateTestSuiteOverviewData.kt +++ b/test_runner/src/main/kotlin/ftl/client/junit/CreateTestSuiteOverviewData.kt @@ -33,4 +33,4 @@ private fun getOverheadTime( 0.0 else (overview.elapsedTime.millis() - testCases.sumTime()) / testCases.size -private fun List.sumTime(): Double = sumByDouble { it.elapsedTime.millis() } +private fun List.sumTime(): Double = sumOf { it.elapsedTime.millis() } diff --git a/test_runner/src/main/kotlin/ftl/reports/output/OutputReportType.kt b/test_runner/src/main/kotlin/ftl/reports/output/OutputReportType.kt index f28a0ca9db..87828c303e 100644 --- a/test_runner/src/main/kotlin/ftl/reports/output/OutputReportType.kt +++ b/test_runner/src/main/kotlin/ftl/reports/output/OutputReportType.kt @@ -4,7 +4,7 @@ enum class OutputReportType { NONE, JSON; - override fun toString() = super.toString().toLowerCase() + override fun toString() = super.toString().lowercase() companion object { fun fromName(name: String?) = if (name.equals(JSON.name, ignoreCase = true)) JSON else NONE diff --git a/test_runner/src/main/kotlin/ftl/run/status/OutputStyle.kt b/test_runner/src/main/kotlin/ftl/run/status/OutputStyle.kt index 5e4eccef6f..a3138538fd 100644 --- a/test_runner/src/main/kotlin/ftl/run/status/OutputStyle.kt +++ b/test_runner/src/main/kotlin/ftl/run/status/OutputStyle.kt @@ -4,6 +4,8 @@ import ftl.run.exception.FlankConfigurationError enum class OutputStyle { Verbose, Single, Multi, Compact } -fun String.asOutputStyle() = capitalize().let { capitalized -> +fun String.asOutputStyle() = replaceFirstChar { it.uppercase() }.let { capitalized -> OutputStyle.values().find { style -> style.name == capitalized } -} ?: throw FlankConfigurationError("Cannot parse output-style: $this, it should be one of ${OutputStyle.values().map { it.name.toLowerCase() }}") +} ?: throw FlankConfigurationError( + "Cannot parse output-style: $this, it should be one of ${OutputStyle.values().map { it.name.lowercase() }}" +) diff --git a/test_runner/src/main/kotlin/ftl/shard/ShardCount.kt b/test_runner/src/main/kotlin/ftl/shard/ShardCount.kt index 0fc7016321..1341973dab 100644 --- a/test_runner/src/main/kotlin/ftl/shard/ShardCount.kt +++ b/test_runner/src/main/kotlin/ftl/shard/ShardCount.kt @@ -45,7 +45,7 @@ private fun testTotalTime( previousMethodDurations: Map, defaultTestTime: Double, defaultClassTestTime: Double -) = testsToRun.sumByDouble { flankTestMethod -> +) = testsToRun.sumOf { flankTestMethod -> getTestMethodTime( flankTestMethod, previousMethodDurations, diff --git a/test_runner/src/main/kotlin/ftl/util/Utils.kt b/test_runner/src/main/kotlin/ftl/util/Utils.kt index c98db6df5c..413cde9322 100644 --- a/test_runner/src/main/kotlin/ftl/util/Utils.kt +++ b/test_runner/src/main/kotlin/ftl/util/Utils.kt @@ -51,7 +51,7 @@ fun uniqueObjectName(): String { // A-Z: 65 - 90 repeat(4) { val ascii = random.nextInt(26) - var letter = (ascii + 'a'.toInt()).toChar() + var letter = (ascii + 'a'.code).toChar() if (ascii % 2 == 0) { letter -= 32 // upcase diff --git a/test_runner/src/test/kotlin/ftl/shard/ShardTest.kt b/test_runner/src/test/kotlin/ftl/shard/ShardTest.kt index 16d6b74145..1326a761c9 100644 --- a/test_runner/src/test/kotlin/ftl/shard/ShardTest.kt +++ b/test_runner/src/test/kotlin/ftl/shard/ShardTest.kt @@ -49,7 +49,7 @@ class ShardTest { assertThat(it.testMethods).isNotEmpty() } - assertThat(result.sumByDouble { it.time }).isEqualTo(16.5) + assertThat(result.sumOf { it.time }).isEqualTo(16.5) val testNames = mutableListOf() result.forEach { shard -> @@ -68,7 +68,7 @@ class ShardTest { val result = createShardsByShardCount(testsToRun, JUnitTest.Result(null), mockArgs(2)) assertThat(result.size).isEqualTo(2) - assertThat(result.sumByDouble { it.time }).isEqualTo(3 * DEFAULT_TEST_TIME_SEC) + assertThat(result.sumOf { it.time }).isEqualTo(3 * DEFAULT_TEST_TIME_SEC) val ordered = result.sortedBy { it.testMethods.size } assertThat(ordered[0].testMethods.size).isEqualTo(1) @@ -80,7 +80,7 @@ class ShardTest { val testsToRun = listOfFlankTestMethod("a/a", "b/b", "c/c", "w", "y", "z") val result = createShardsByShardCount(testsToRun, sample(), mockArgs(4)) assertThat(result.size).isEqualTo(4) - assertThat(result.sumByDouble { it.time }).isEqualTo(7.0 + 3 * DEFAULT_TEST_TIME_SEC) + assertThat(result.sumOf { it.time }).isEqualTo(7.0 + 3 * DEFAULT_TEST_TIME_SEC) val ordered = result.sortedBy { it.testMethods.size } // Expect a/a, b/b, c/c to be in one shard, and w, y, z to each be in their own shards.