mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[tests] IJPL-211571 Allow skipping embedded client in tests
JetBrainsClientDownloaderTest.testCleanDownloadStaging checks the correctness of downloaded data from staging. Checking local (embedded) installation is incorrect in this test. Moreover, the test fails because of that. GitOrigin-RevId: 78e6018677c7af2e7e260e4c63770330f5f63f4a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
faefa4b0a0
commit
0818919bdd
+19
-3
@@ -53,6 +53,7 @@ import com.sun.jna.platform.win32.WinBase
|
||||
import com.sun.jna.platform.win32.WinNT
|
||||
import com.sun.jna.ptr.IntByReference
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
@@ -378,11 +379,26 @@ object CodeWithMeClientDownloader {
|
||||
|
||||
fun downloadFrontendAndJdk(sessionInfoResponse: JetBrainsClientDownloadInfo,
|
||||
progressIndicator: ProgressIndicator): FrontendInstallation {
|
||||
return downloadFrontendAndJdkImpl(sessionInfoResponse, progressIndicator, useEmbeddedClientIfAvailable = true)
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
fun downloadFrontendAndJdk(sessionInfoResponse: JetBrainsClientDownloadInfo,
|
||||
progressIndicator: ProgressIndicator,
|
||||
useEmbeddedClientIfAvailable: Boolean): FrontendInstallation {
|
||||
return downloadFrontendAndJdkImpl(sessionInfoResponse, progressIndicator, useEmbeddedClientIfAvailable)
|
||||
}
|
||||
|
||||
private fun downloadFrontendAndJdkImpl(sessionInfoResponse: JetBrainsClientDownloadInfo,
|
||||
progressIndicator: ProgressIndicator,
|
||||
useEmbeddedClientIfAvailable: Boolean): FrontendInstallation {
|
||||
ApplicationManager.getApplication().assertIsNonDispatchThread()
|
||||
|
||||
val embeddedClientLauncher = createEmbeddedClientLauncherIfAvailable(sessionInfoResponse.clientBuildNumber)
|
||||
if (embeddedClientLauncher != null) {
|
||||
return EmbeddedFrontendInstallation(embeddedClientLauncher)
|
||||
if (useEmbeddedClientIfAvailable) {
|
||||
val embeddedClientLauncher = createEmbeddedClientLauncherIfAvailable(sessionInfoResponse.clientBuildNumber)
|
||||
if (embeddedClientLauncher != null) {
|
||||
return EmbeddedFrontendInstallation(embeddedClientLauncher)
|
||||
}
|
||||
}
|
||||
|
||||
val tempDir = FileUtil.createTempDirectory("jb-cwm-dl", null).toPath()
|
||||
|
||||
Reference in New Issue
Block a user