feat(tests): add unit tests for FEO Scheduler - #113
Open
MohamedRady-99 wants to merge 1 commit into
Open
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
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.
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!