Skip to content

Commit e5a18fe

Browse files
committed
test: fix requires_java to check for runtime JAR, not just binaries
Ubuntu runners have Java/Maven pre-installed, so checking for java/mvn binaries doesn't skip. The actual dependency is the codeflash-runtime JAR which must be built from codeflash-java-runtime/ via Maven.
1 parent 241fd2d commit e5a18fe

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/test_languages/test_java/test_comparator.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66

77
import pytest
88

9-
from codeflash.languages.java.comparator import compare_invocations_directly, compare_test_results, values_equal
9+
from codeflash.languages.java.comparator import (
10+
_find_comparator_jar,
11+
compare_invocations_directly,
12+
compare_test_results,
13+
values_equal,
14+
)
1015
from codeflash.models.models import TestDiffScope
1116

12-
# Skip tests that require Java runtime if Java is not available
17+
# Skip tests that require the codeflash-runtime JAR (built by Maven from codeflash-java-runtime/)
1318
requires_java = pytest.mark.skipif(
14-
shutil.which("java") is None or shutil.which("mvn") is None,
15-
reason="Java/Maven not found - skipping Comparator integration tests",
19+
_find_comparator_jar() is None,
20+
reason="codeflash-runtime JAR not found - skipping Comparator integration tests",
1621
)
1722

1823
# Kryo-serialized bytes for common test values.

0 commit comments

Comments
 (0)