Skip to content

Commit

Permalink
tests: annotate precise version of JDK (#180)
Browse files Browse the repository at this point in the history
* tests: annotate precise version of JDK

* debug

* Escape regular expression

* Revert "debug"

This reverts commit 4e35e8d.
  • Loading branch information
algomaster99 authored Mar 12, 2024
1 parent 65209f5 commit 22a91a7
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import java.util.Map;
import java.util.Set;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import org.junit.jupiter.api.io.TempDir;

class JdkIndexerTest {
Expand All @@ -34,7 +33,7 @@ void jdkIndexShouldBeDeterministic_irrespectiveOfTheJDK(@TempDir Path tempDir) t
assertThat(contentFirst).isEqualTo(contentSecond);
}

@EnabledOnJre(JRE.JAVA_21)
@EnabledIfSystemProperty(named = "java.vendor.version", matches = "Temurin-21\\.0\\.2\\+13")
@Test
void jdk21_0_2_indexShouldBeReproducible_temurin(@TempDir Path tempDir) throws IOException {
// arrange
Expand All @@ -55,7 +54,7 @@ void jdk21_0_2_indexShouldBeReproducible_temurin(@TempDir Path tempDir) throws I
.isEqualTo(1));
}

@EnabledOnJre(JRE.JAVA_17)
@EnabledIfSystemProperty(named = "java.vendor.version", matches = "Temurin-17\\.0\\.10\\+7")
@Test
void jdk17_0_10_indexShouldBeReproducibleAcrossMultiple_implementations(@TempDir Path tempDir) throws IOException {
// arrange
Expand Down

0 comments on commit 22a91a7

Please sign in to comment.