Skip to content

feat(tests): add unit tests for FEO Scheduler - #113

Open
MohamedRady-99 wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:feat/feo-unit-tests
Open

feat(tests): add unit tests for FEO Scheduler#113
MohamedRady-99 wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:feat/feo-unit-tests

Conversation

@MohamedRady-99

Copy link
Copy Markdown
Contributor

Description

This PR resolves the issue with the lack of isolated unit tests for the FEO Scheduler's graceful shutdown logic #112.

Since the component previously relied almost entirely on heavy system-level feature integration tests, it was difficult to quickly verify edge cases or isolated internal state transitions. The test coverage has been updated to ensure these specific boundaries are explicitly verified without needing to spawn OS child processes.

Proposal:

Currently, the FEO component lacks dedicated unit tests for isolated scheduler state transitions. This PR updates the workflow as follows:

Mock Scheduler Connector: Introduce a thread-safe MockConnector implementing the ConnectScheduler trait in src/feo/src/scheduler.rs to intercept and record signal transmissions without networking.
Test Environment Initialization: Add init_test_env() to safely initialize the global timestamp utility across parallel Rust tests.
Graceful Shutdown Verification: Add test_graceful_shutdown_only_started_activities using the mock connector to verify that the graceful shutdown subset logic accurately sends Shutdown signals only to activities that have successfully started, avoiding hanging or sending invalid signals to uninitialized activities.
Bazel Build Configuration: Add rust_test(name = "feo_test") to src/feo/BUILD.bazel to expose these new inline tests to the Bazel test runner.

Thanks!

@github-actions

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/07/20 11:05:38 Downloading https://github.com/aspect-build/aspect-cli/releases/download/5.9.36/bazel-5.9.36-linux-x86_64...
2026/07/20 11:05:39 Downloading https://releases.bazel.build/8.3.0/release/bazel-8.3.0-linux-x86_64...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 57183c24-f5e7-4323-9aac-17d77218bef2
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'rules_boost+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-LTilyiMMjpYyAi1PW+8RycyAEHy9clo7915R0Bchb2E="
DEBUG: Repository rules_boost+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.1.1, but got score_bazel_platforms@0.1.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'googletest', the root module requires module version googletest@1.17.0, but got googletest@1.17.0.bcr.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 4 packages loaded
Loading: 4 packages loaded
    currently loading: 
Loading: 4 packages loaded
    currently loading: 
Loading: 4 packages loaded
    currently loading: 
Loading: 4 packages loaded
    currently loading: 
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/feo/feo/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/feo/feo/BUILD
INFO: Elapsed time: 36.773s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@masc2023
masc2023 requested a review from armin-acn July 20, 2026 11:07
@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

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.

1 participant