Replace deprecated usages of max/min with maxOrNull/minOrNull
This commit is contained in:
@@ -170,7 +170,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
val opts2 = configureDaemonJVMOptions(inheritMemoryLimits = false, inheritAdditionalProperties = false, inheritOtherJvmOptions = false)
|
||||
assertEquals("300m", opts2.maxMemory)
|
||||
assertEquals( -1, DaemonJVMOptionsMemoryComparator().compare(opts, opts2))
|
||||
assertEquals("300m", listOf(opts, opts2).maxWith(DaemonJVMOptionsMemoryComparator())?.maxMemory)
|
||||
assertEquals("300m", listOf(opts, opts2).maxWithOrNull(DaemonJVMOptionsMemoryComparator())?.maxMemory)
|
||||
|
||||
val myXmxParam = ManagementFactory.getRuntimeMXBean().inputArguments.first { it.startsWith("-Xmx") }
|
||||
TestCase.assertNotNull(myXmxParam)
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
configureDaemonJVMOptions(inheritMemoryLimits = false, inheritAdditionalProperties = false, inheritOtherJvmOptions = false)
|
||||
assertEquals("300m", opts2.maxMemory)
|
||||
assertEquals(-1, DaemonJVMOptionsMemoryComparator().compare(opts, opts2))
|
||||
assertEquals("300m", listOf(opts, opts2).maxWith(DaemonJVMOptionsMemoryComparator())?.maxMemory)
|
||||
assertEquals("300m", listOf(opts, opts2).maxWithOrNull(DaemonJVMOptionsMemoryComparator())?.maxMemory)
|
||||
|
||||
val myXmxParam = ManagementFactory.getRuntimeMXBean().inputArguments.first { it.startsWith("-Xmx") }
|
||||
TestCase.assertNotNull(myXmxParam)
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ class ConnectionsTest : KotlinIntegrationTestBase() {
|
||||
|
||||
private fun expectNewDaemon(serverType: ServerType, extraAction: (CompileServiceAsync) -> Unit = {}) = expectDaemon(
|
||||
getDaemons = ::getNewDaemonsOrAsyncWrappers,
|
||||
chooseDaemon = { daemons -> daemons.maxWith(comparator)!!.daemon },
|
||||
chooseDaemon = { daemons -> daemons.maxWithOrNull(comparator)!!.daemon },
|
||||
getInfo = { d -> runBlocking { d.getDaemonInfo() } },
|
||||
registerClient = { d -> runBlocking { d.registerClient(generateClient()) } },
|
||||
port = { d -> d.serverPort },
|
||||
|
||||
Reference in New Issue
Block a user