dragonwell-project / dragonwell11

Alibaba Dragonwell11 JDK
https://www.aliyun.com/product/dragonwell
GNU General Public License v2.0
557 stars 113 forks source link

[Bug] sometimes "TestExecStartupProbe" exec failed. #687

Closed lingjun-cg closed 11 months ago

lingjun-cg commented 11 months ago

The "TestExecStartupProbe" test case assume the following process execute sequence.

  1. The main application running.
  2. Then a startup probe process running, test if main application startup successful
  3. If startup successful, execute jcmd pid Quickstart.dump which create new process "sat-adapter"
  4. The "sat-adapter" create a new process do CDS dump
  5. Done

The main application should run as quick as possible, because it's the test target. But if main application not run long enough to make the completion of step 2 ~ step 5, the test case will failed. The current implementation use a hard-code sleep time, but if run on a heavy load host, the hard code time is not suitable.

The improve is :

  1. Use a file that indicate if dump successful that avoid a hard-code sleep time
  2. No need sleep when run with replayer role.