From f1fce747ca89ddd071317f36036ef5569543d927 Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Wed, 15 Oct 2025 16:16:02 +0300 Subject: [PATCH 1/3] Fix PathHandler tests --- .../jupyter/kernel/util/PathsHandlerTest.java | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java b/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java index 8737d2d..9bbc2e8 100644 --- a/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java +++ b/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java @@ -9,20 +9,21 @@ import java.nio.file.Path; import java.util.List; import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; -public class PathsHandlerTest { +class PathsHandlerTest { @Test - public void testSpit() { + void testSpit() { assertEquals(List.of(), PathsHandler.split("")); assertEquals(List.of("a"), PathsHandler.split("a")); assertEquals(List.of("a", "b/c/d"), PathsHandler.split("a" + File.pathSeparator + "b/c/d")); } @Test - public void testSpitAndResolveGlobs(@TempDir Path dir) throws IOException { + void testSpitAndResolveGlobs(@TempDir Path dir) throws IOException { Files.createFile(dir.resolve("a1.txt")); Files.createFile(dir.resolve("a2.txt")); @@ -30,16 +31,29 @@ public void testSpitAndResolveGlobs(@TempDir Path dir) throws IOException { Files.createFile(dir.resolve("b2.txt")); Files.createFile(dir.resolve("c1.txt")); - String basePath = dir + File.separator; + String baseGlob = dir + "/"; // glob resolver only accepts "/" as splitter assertEquals(List.of(), PathsHandler.splitAndResolveGlobs("")); - assertEquals(List.of(), PathsHandler.splitAndResolveGlobs(basePath + "a")); - assertEquals(List.of(), PathsHandler.splitAndResolveGlobs(basePath + "a" + File.pathSeparator + "b/c/d")); + assertEquals(List.of(), PathsHandler.splitAndResolveGlobs(baseGlob + "a")); + assertEquals(List.of(), PathsHandler.splitAndResolveGlobs(baseGlob + "a" + File.pathSeparator + "b/c/d")); - assertEquals(List.of(basePath + "a1.txt", basePath + "a2.txt"), - PathsHandler.splitAndResolveGlobs(basePath + "a*").stream().map(p -> p.toAbsolutePath().toString()).sorted().collect(Collectors.toList())); assertEquals( - List.of(basePath + "a1.txt", basePath + "a2.txt", basePath + "b1.txt", basePath + "b2.txt"), - PathsHandler.splitAndResolveGlobs(basePath + "a*" + File.pathSeparator + basePath + "b*").stream().map(p -> p.toAbsolutePath().toString()).sorted().collect(Collectors.toList())); + List.of(joinPath(dir, "a1.txt"), joinPath(dir, "a2.txt")), + PathsHandler.splitAndResolveGlobs(baseGlob + "a*").stream() + .map(p -> p.toAbsolutePath().toString()) + .sorted() + .collect(Collectors.toList()) + ); + assertEquals( + List.of(joinPath(dir, "a1.txt"), joinPath(dir, "a2.txt"), joinPath(dir, "b1.txt"), joinPath(dir, "b2.txt")), + PathsHandler.splitAndResolveGlobs(baseGlob + "a*" + File.pathSeparator + baseGlob + "b*").stream() + .map(p -> p.toAbsolutePath().toString()) + .sorted() + .collect(Collectors.toList()) + ); + } + + private static String joinPath(Object... elements) { + return Stream.of(elements).map(String::valueOf).collect(Collectors.joining(File.separator)); } } From b6034c1da199473d4161f0701838708222782a3f Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Wed, 15 Oct 2025 16:16:54 +0300 Subject: [PATCH 2/3] Update CI Add windows-latest strategy --- .github/workflows/maven.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f685d19..23311d6 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -8,11 +8,15 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: + os: [ ubuntu-latest ] java: [ 11, 17, 21 ] + include: + - os: windows-latest + java: 25 steps: - name: Checkout @@ -26,4 +30,11 @@ jobs: cache: 'maven' - name: Build and test - run: mvn clean verify -U + shell: bash + run: | + if [ "${{ runner.os }}" == "Windows" ]; then + # Testcontainers doesn't support Windows containers + mvn clean test -U + else + mvn clean verify -U + fi From afdb833046a1e51dd276633746b67a6971321e92 Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Thu, 11 Dec 2025 17:42:29 +0300 Subject: [PATCH 3/3] Make test methods public --- .../dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java b/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java index 9bbc2e8..ceb6c80 100644 --- a/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java +++ b/jjava-jupyter/src/test/java/org/dflib/jjava/jupyter/kernel/util/PathsHandlerTest.java @@ -13,17 +13,17 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -class PathsHandlerTest { +public class PathsHandlerTest { @Test - void testSpit() { + public void testSpit() { assertEquals(List.of(), PathsHandler.split("")); assertEquals(List.of("a"), PathsHandler.split("a")); assertEquals(List.of("a", "b/c/d"), PathsHandler.split("a" + File.pathSeparator + "b/c/d")); } @Test - void testSpitAndResolveGlobs(@TempDir Path dir) throws IOException { + public void testSpitAndResolveGlobs(@TempDir Path dir) throws IOException { Files.createFile(dir.resolve("a1.txt")); Files.createFile(dir.resolve("a2.txt"));