branch-4.1: [fix](test) skip test_flight_record when the frontend is not on the regression runner #65933#65946
Merged
Merged
Conversation
…egression runner (#65933) Problem Summary: `flightRecord` starts the java flight recorder by running `jps` and `jcmd` **on the machine that executes the regression suite**, so `demo_p0/test_flight_record` only works when the frontend and the regression runner are deployed together, e.g. a local development cluster. The case never verified that precondition. On a runner without a local frontend the case failed with ``` java.lang.IllegalStateException: Can not found process: DorisFE at .../demo_p0/test_flight_record.groovy:30 ``` and was reported as a product failure, although nothing was wrong with the product. This PR checks the precondition in the case and returns early when the frontend is not running on this machine, the same way the case already skips on jdk below 17: ```groovy String feProcessName = "DorisFE" boolean feOnThisMachine = false try { feOnThisMachine = "jps".execute().text.readLines().any { it.contains(feProcessName) } } catch (Throwable t) { logger.info("Can not execute jps: ${t.getMessage()}") } if (!feOnThisMachine) { logger.info("Process ${feProcessName} is not running on this machine, ... skip test") return } ``` `FlightRecordAction` is deliberately left untouched: once the action is really invoked, failing loudly is the right behavior, the precondition belongs to the case. The rest of the case is kept as is, it still demonstrates the `flightRecord` api. ### Release note None ### Check List (For Author) - Test - [x] Manual test (add detailed scripts or steps below) Ran the real regression harness against a local cluster (jdk17), with `sh run-regression-test.sh --run -d demo_p0 -s test_flight_record -g nonConcurrent`. The "frontend not here" case is simulated by pointing the probed process name at a name that does not exist, which is what the action sees when the frontend is on another machine. | | frontend process | result | |---|---|---| | before this PR | not found | `java.lang.IllegalStateException: Can not found process: ...`, `failed 1 suites` | | after this PR | not found | `Process ... is not running on this machine, ... skip test`, `failed 0 suites` | | after this PR | found | `JFR.start` / 11x `select 100` / `JFR.stop` / parse ok, `allocation bytes: 2348624`, `.jfr` cleaned up, `failed 0 suites` |
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
Contributor
|
skip buildall |
yiguolei
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #65933