Skip to content

Commit

Permalink
Excavator: Switch to JUnit 5 to parallelize tests and speed up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Feb 23, 2023
1 parent bf82be5 commit 65ecb88
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 19 deletions.
6 changes: 5 additions & 1 deletion baseline-refaster-rules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ dependencies {
testImplementation 'org.immutables:value::annotations'

compileOnly 'org.immutables:value::annotations'
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine', {
because 'allows JUnit 3 and JUnit 4 tests to run'
}
}

// Do not apply refaster rules
Expand All @@ -35,4 +39,4 @@ moduleJvmArgs {
'jdk.compiler/com.sun.tools.javac.util'
]
opens = ['jdk.compiler/com.sun.tools.javac.comp']
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import static org.assertj.core.api.Assumptions.assumeThat;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class AddAllArrayToBuilderTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class CollectionsIsEmptyTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class InvocationTargetExceptionCauseTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class OptionalOrElseSupplierTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class SortedFirstNaturalTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class SortedFirstTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import static org.assertj.core.api.Assumptions.assumeThat;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class TritiumReplaceGaugeTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.baseline.refaster;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class Utf8LengthTest {

Expand Down
3 changes: 2 additions & 1 deletion baseline-refaster-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {
api 'com.google.guava:guava'
api 'junit:junit'
api 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'
}

tasks.checkClassUniqueness.enabled = false
Expand All @@ -42,4 +43,4 @@ moduleJvmArgs {
'jdk.compiler/com.sun.tools.javac.tree',
'jdk.compiler/com.sun.tools.javac.util'
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import java.io.IOException;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class CheckstyleReportHandlerTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.google.common.collect.ImmutableList;
import java.io.File;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public final class FailuresReportGeneratorTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import java.io.File;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public final class JavacFailuresSupplierTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import java.io.StringWriter;
import javax.xml.transform.TransformerException;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.w3c.dom.Document;

public final class JunitReportCreatorTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@
import org.gradle.api.plugins.quality.Checkstyle;
import org.gradle.api.reporting.SingleFileReport;
import org.gradle.testfixtures.ProjectBuilder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

public class JunitReportsFinalizerTests {

@Rule
public final TemporaryFolder projectDir = new TemporaryFolder();
@TempDir
public File projectDir;

@Test
public void translatesCheckstyleReport() throws IOException, TransformerException {
Expand Down

0 comments on commit 65ecb88

Please sign in to comment.