Skip to content

Create basic stress tests for LM and HM - #1102

Open
MilanTripkovic02 wants to merge 1 commit into
eclipse-score:mainfrom
MilanTripkovic02:tests-437
Open

MilanTripkovic02 wants to merge 1 commit into
eclipse-score:mainfrom
MilanTripkovic02:tests-437

Conversation

@MilanTripkovic02

Copy link
Copy Markdown
Contributor

Created 2 integration tests:

  • stress_launch: the Launch Manager starts and stops 1024 processes, the control client test driver plus 512 reporting and 511 native processes, all running counting_process. The config is generated by generate_config.py. The activation and deactivation time are recorded in the test results.
  • stress_health_monitor: one process with 1024 heartbeat monitors fed from 16 threads. No recovery action while the heartbeats are sent, and the missing heartbeats are detected after they stop.

Tested with:

bazel test --config=x86_64-qnx //tests/integration/... //examples/... //score/...
bazel test --config=x86_64-linux //tests/integration/... //examples/... //score/...
bazel test --config=arm64-qnx //tests/integration/... //examples/... //score/...

Closes #437

* Create Basic Stress Tests for LM and HM

Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com>
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-1102: https://eclipse-score.github.io/lifecycle/pr-1102/

@SimonKozik SimonKozik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should merge those test, but if not then I would try to use better names.

I'm worried a bit about that flaky tag...

)

integration_test(
name = "stress_launch",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to have better folder names and test names.
For Launch Manager stress test I would use stress_test_launch_manager and stress_test_health_monitor for HM.

We could also go for a single top level folder stress_test and then have two sub folders (launch_manager and health_monitor)

This way:

  • counting_process.cpp could be moved to this folder.
  • You could run tests by calling:
    • bazel run //tests/integration/stress_test:launch_manager
    • bazel run //tests/integration/stress_test:health_monitor
  • You will have single BUILD file

const auto start = std::chrono::steady_clock::now();

const auto result = client.activate_run_target(RunTargetName{name}, true);
EXPECT_TRUE(result.has_value()) << "Activation of " << name << " failed: " << result.error().Message();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use ASSERT_TRUE here. If you fail to put Run Target activation into the queue, then the pop_event doesn't make sense at all (the original request was not accepted).

Additionally if you fail to activate Stress Run Target, then there is no point in measuring the deactivation time.

The same comment applies to the health monitor stress test.

],
config = ":config.json",
tags = [
"flaky", # Test uses heartbeat monitoring which can be flaky

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is meant here by this flaky tag. If this test cannot consistently pass on a CI server, then maybe we should change what we are measuring

"//score/launch_manager:control_cc",
"//score/launch_manager:lifecycle_cc",
"//tests/utils/test_helper",
"@googletest//:gtest_main",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should switch to @googletest//:gtest as we are supplying our own main function.

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — 9f76bc90 Waiting Nov 26, 2026 by MilanTripkovic02 via Build and test x86_64-qnx / approval #2833
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Create Basic Stress Tests for LM and HM

2 participants