Skip to content

Commit 2e078f7

Browse files
revert: restore Maven-based execution for line-profile tests
Line-profile direct JVM execution is being handled in a separate PR. Reverting to avoid conflicts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aaee7aa commit 2e078f7

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

codeflash/languages/java/test_runner.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,14 +1921,21 @@ def run_line_profile_tests(
19211921
if line_profile_output_file:
19221922
run_env["CODEFLASH_LINE_PROFILE_OUTPUT"] = str(line_profile_output_file)
19231923

1924-
# Direct JVM execution (fast path — bypasses Maven overhead)
1924+
# Run tests once with profiling
1925+
# Maven needs substantial timeout for JVM startup + test execution
1926+
# Use minimum of 120s to account for Maven overhead, or larger if specified
19251927
min_timeout = 120
19261928
effective_timeout = max(timeout or min_timeout, min_timeout)
19271929
logger.debug("Running line profiling tests (single run) with timeout=%ds", effective_timeout)
1928-
result, result_xml_path = _run_direct_or_fallback_maven(
1929-
maven_root, test_module, test_paths, run_env, effective_timeout, mode="line_profile",
1930+
result = _run_maven_tests(
1931+
maven_root, test_paths, run_env, timeout=effective_timeout, mode="line_profile", test_module=test_module
19301932
)
19311933

1934+
# Get result XML path
1935+
target_dir = _get_test_module_target_dir(maven_root, test_module)
1936+
surefire_dir = target_dir / "surefire-reports"
1937+
result_xml_path = _get_combined_junit_xml(surefire_dir, -1)
1938+
19321939
return result_xml_path, result
19331940

19341941

0 commit comments

Comments
 (0)