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.
This commit is contained in:
Kevin Turcios 2026-04-09 12:19:10 -05:00
parent 241fd2d59c
commit e5a18feb61

View file

@ -6,13 +6,18 @@ from pathlib import Path
import pytest
from codeflash.languages.java.comparator import compare_invocations_directly, compare_test_results, values_equal
from codeflash.languages.java.comparator import (
_find_comparator_jar,
compare_invocations_directly,
compare_test_results,
values_equal,
)
from codeflash.models.models import TestDiffScope
# Skip tests that require Java runtime if Java is not available
# Skip tests that require the codeflash-runtime JAR (built by Maven from codeflash-java-runtime/)
requires_java = pytest.mark.skipif(
shutil.which("java") is None or shutil.which("mvn") is None,
reason="Java/Maven not found - skipping Comparator integration tests",
_find_comparator_jar() is None,
reason="codeflash-runtime JAR not found - skipping Comparator integration tests",
)
# Kryo-serialized bytes for common test values.