Skip to content

Commit

Permalink
Use loadServices in ClientLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Nov 16, 2024
1 parent 0fd28fa commit 336817b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package io.ktor.client.tests.utils

import io.ktor.client.*
import io.ktor.client.engine.*
import io.ktor.util.reflect.*
import io.ktor.utils.io.*
import kotlinx.coroutines.*
import kotlinx.coroutines.debug.*
import java.util.*

@OptIn(InternalAPI::class)
internal actual val enginesToTest: Iterable<HttpClientEngineFactory<HttpClientEngineConfig>> by lazy {
ServiceLoader.load(
HttpClientEngineContainer::class.java,
HttpClientEngineContainer::class.java.classLoader
).map { it.factory }
loadServices<HttpClientEngineContainer>().map { it.factory }
}
internal actual val platformName: String by lazy {
val os = System.getProperty("os.name", "unknown").lowercase(Locale.getDefault())
Expand Down

0 comments on commit 336817b

Please sign in to comment.