merge: resolve conflict with omni-java, keep upstream line profiler timeout
The upstream omni-java branch already implemented a cleaner version of the line profiler timeout fix (with min_timeout variable and debug logging). Keep their version since it achieves the same goal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
5751d3ba70
2 changed files with 11 additions and 2 deletions
|
|
@ -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=max(timeout or 0, 120),
|
||||
timeout=effective_timeout,
|
||||
mode="line_profile",
|
||||
test_module=test_module,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue