From 336817b0b64f700333510ce5e3b62506053db308 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Sat, 16 Nov 2024 14:38:25 +0100 Subject: [PATCH] Use loadServices in ClientLoader --- .../src/io/ktor/client/tests/utils/ClientLoader.jvm.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ktor-client/ktor-client-tests/jvm/src/io/ktor/client/tests/utils/ClientLoader.jvm.kt b/ktor-client/ktor-client-tests/jvm/src/io/ktor/client/tests/utils/ClientLoader.jvm.kt index 2ad36d0b601..bb514b33467 100644 --- a/ktor-client/ktor-client-tests/jvm/src/io/ktor/client/tests/utils/ClientLoader.jvm.kt +++ b/ktor-client/ktor-client-tests/jvm/src/io/ktor/client/tests/utils/ClientLoader.jvm.kt @@ -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> by lazy { - ServiceLoader.load( - HttpClientEngineContainer::class.java, - HttpClientEngineContainer::class.java.classLoader - ).map { it.factory } + loadServices().map { it.factory } } internal actual val platformName: String by lazy { val os = System.getProperty("os.name", "unknown").lowercase(Locale.getDefault())