From 07fc70b084a7fd325612dcfdadc5eafb969c69af Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Wed, 6 Dec 2017 14:51:52 +0100 Subject: [PATCH] junit: adjust vintage engine version to platform version --- .../src/com/intellij/execution/junit/TestObject.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/junit/src/com/intellij/execution/junit/TestObject.java b/plugins/junit/src/com/intellij/execution/junit/TestObject.java index 15314a0338f0..d9dc3eb541de 100644 --- a/plugins/junit/src/com/intellij/execution/junit/TestObject.java +++ b/plugins/junit/src/com/intellij/execution/junit/TestObject.java @@ -201,12 +201,11 @@ public abstract class TestObject extends JavaTestFrameworkRunnableState psiFacade.findClass("org.junit.platform.commons.JUnitException", globalSearchScope)); + String launcherVersion = ObjectUtils.notNull(getVersion(classFromCommon), "1.0.0"); if (!hasPackageWithDirectories(psiFacade, "org.junit.platform.launcher", globalSearchScope)) { - - PsiClass classFromCommon = DumbService.getInstance(project).computeWithAlternativeResolveEnabled(() -> psiFacade.findClass("org.junit.platform.commons.JUnitException", globalSearchScope)); - String version = ObjectUtils.notNull(getVersion(classFromCommon), "1.0.0"); downloadDependenciesWhenRequired(project, classPath, - new RepositoryLibraryProperties("org.junit.platform", "junit-platform-launcher", version)); + new RepositoryLibraryProperties("org.junit.platform", "junit-platform-launcher", launcherVersion)); } //add standard engines only if no engine api is present @@ -222,7 +221,7 @@ public abstract class TestObject extends JavaTestFrameworkRunnableState