Fix tests: do not create SDK 2 times

GitOrigin-RevId: 362ebe2df3428ed5068d3af5e0593fbd9e85ed8f
This commit is contained in:
Ilya.Kazakevich
2023-12-15 15:29:48 +01:00
committed by intellij-monorepo-bot
parent b793719aac
commit da375b465b

View File

@@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.Assert;
import java.nio.file.Path;
import java.util.List;
@@ -46,7 +47,7 @@ public abstract class CreateConfigurationTask<T extends AbstractPythonRunConfigu
@Override
public void runTestOn(@NotNull final String sdkHome, @Nullable Sdk existingSdk) throws InvalidSdkException {
if (!existingSdk.getHomePath().equals(sdkHome)) {
if (!Path.of(existingSdk.getHomePath()).equals(Path.of(sdkHome))) {
// Creates SDK that doesn't exist yet
createTempSdk(sdkHome, SdkCreationType.SDK_PACKAGES_ONLY);
}