Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions codeflash/languages/java/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,12 +1508,16 @@ def run_line_profile_tests(
run_env["CODEFLASH_LINE_PROFILE_OUTPUT"] = str(line_profile_output_file)

# Run tests once with profiling
logger.debug("Running line profiling tests (single run)")
# Maven needs substantial timeout for JVM startup + test execution
# Use minimum of 120s to account for Maven overhead, or larger if specified
min_timeout = 120
effective_timeout = max(timeout or min_timeout, min_timeout)
logger.debug("Running line profiling tests (single run) with timeout=%ds", effective_timeout)
result = _run_maven_tests(
maven_root,
test_paths,
run_env,
timeout=timeout or 120,
timeout=effective_timeout,
mode="line_profile",
test_module=test_module,
)
Expand Down
5 changes: 5 additions & 0 deletions codeflash/verification/parse_test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,12 @@ def parse_test_xml(
if not test_file_path.exists():
logger.warning(f"Could not find the test for file name - {test_file_path} ")
continue
# Try to match by instrumented file path first (for generated/instrumented tests)
test_type = test_files.get_test_type_by_instrumented_file_path(test_file_path)
if test_type is None:
# Fallback: try to match by original file path (for existing unit tests that were instrumented)
# JUnit XML may reference the original class name, resolving to the original file path
test_type = test_files.get_test_type_by_original_file_path(test_file_path)
if test_type is None:
# Log registered paths for debugging
registered_paths = [str(tf.instrumented_behavior_file_path) for tf in test_files.test_files]
Expand Down
Loading