[maven] wsl tests small fix

GitOrigin-RevId: 620bce9f72358cb848d0851b8041cd6f577152d4
This commit is contained in:
Alexander Bubenchikov
2021-07-26 18:07:24 +03:00
committed by intellij-monorepo-bot
parent 545a93859c
commit 91dd581f79

View File

@@ -3,16 +3,15 @@ package org.jetbrains.idea.maven;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.VersionComparatorUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.maven.compatibility.MavenWrapperTestFixture;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@RunWith(Parameterized.class)
public abstract class MavenMultiVersionImportingTestCase extends MavenImportingTestCase {
@@ -29,7 +28,7 @@ public abstract class MavenMultiVersionImportingTestCase extends MavenImportingT
return ContainerUtil.map(mavenVersionsToRun, it -> new String[]{it});
}
@NotNull
@Nullable
protected MavenWrapperTestFixture myWrapperTestFixture;
@Parameterized.Parameter(0)
@@ -49,7 +48,17 @@ public abstract class MavenMultiVersionImportingTestCase extends MavenImportingT
@Before
public void before() throws Exception {
if ("bundled".equals(myMavenVersion)) {
return;
}
myWrapperTestFixture = new MavenWrapperTestFixture(myProject, myMavenVersion);
myWrapperTestFixture.setUp();
}
@After
public void after() throws Exception {
if (myWrapperTestFixture != null) {
myWrapperTestFixture.tearDown();
}
}
}