Skip to content

feat(lifecycle_client): add MwLifeCycleManagerMock for OSS consumers - #391

Merged
NicolasFussberger merged 2 commits into
eclipse-score:mainfrom
Chahult:feat/add_mw_lifecycle_manager_mock
Jul 30, 2026
Merged

feat(lifecycle_client): add MwLifeCycleManagerMock for OSS consumers#391
NicolasFussberger merged 2 commits into
eclipse-score:mainfrom
Chahult:feat/add_mw_lifecycle_manager_mock

Conversation

@Chahult

@Chahult Chahult commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #265

  • Add MwLifeCycleManagerMock that intercepts LifeCycleManager::report_running() and LifeCycleManager::report_shutdown() via global GMock callbacks, allowing unit tests to set expectations on both methods without real IPC calls to the Launch Manager.
  • Remove the empty report_running() stub from lifecyclemanagermock.cpp; it is now owned by mwlifecyclemanagermock.cpp with a null-safe callback dispatch.
  • Move report_shutdown() out of the inline header body and into lifecyclemanager.cpp (empty no-op) to allow the mock translation unit to provide a separate definition.
  • Add mw_lifecycle_manager_mock Bazel target and mw_lifecycle_manager_mock_cc public alias in //score/launch_manager.
  • lifecycle_mock now depends on mw_lifecycle_manager_mock so existing consumers of lifecycle_mock continue to link without changes.
  • Add MwLifecycleMockTest fixture and two tests to lifecycle_mocks_UT.cpp.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 47101758-6fac-4cea-b0c4-3b45aaa497b4
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (38 packages loaded, 10 targets configured)

Analyzing: target //:license-check (89 packages loaded, 10 targets configured)

Analyzing: target //:license-check (144 packages loaded, 2858 targets configured)

Analyzing: target //:license-check (158 packages loaded, 6152 targets configured)

Analyzing: target //:license-check (162 packages loaded, 9327 targets configured)

Analyzing: target //:license-check (169 packages loaded, 9389 targets configured)

Analyzing: target //:license-check (170 packages loaded, 9397 targets configured)

Analyzing: target //:license-check (170 packages loaded, 9397 targets configured)

Analyzing: target //:license-check (173 packages loaded, 11285 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

INFO: Analyzed target //:license-check (175 packages loaded, 11535 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 27.753s, Critical Path: 2.69s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown
Contributor

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

Comment thread score/launch_manager/BUILD Outdated
Closes eclipse-score#265

- Add MwLifeCycleManagerMock that intercepts LifeCycleManager::report_running()
  and LifeCycleManager::report_shutdown() via global GMock callbacks, allowing
  unit tests to set expectations on both methods without real IPC calls to the
  Launch Manager.
- Remove the empty report_running() stub from lifecyclemanagermock.cpp; it is
  now owned by mwlifecyclemanagermock.cpp with a null-safe callback dispatch.
- Move report_shutdown() out of the inline header body and into lifecyclemanager.cpp
  (empty no-op) to allow the mock translation unit to provide a separate definition.
- Add mw_lifecycle_manager_mock Bazel target and mw_lifecycle_manager_mock_cc
  public alias in //score/launch_manager.
- lifecycle_mock now depends on mw_lifecycle_manager_mock so existing consumers
  of lifecycle_mock continue to link without changes.
- Add MwLifecycleMockTest fixture and two tests to lifecycle_mocks_UT.cpp.
@Chahult
Chahult force-pushed the feat/add_mw_lifecycle_manager_mock branch from 6c28842 to 8dda987 Compare July 30, 2026 12:17
@Chahult
Chahult had a problem deploying to workflow-approval July 30, 2026 12:17 — with GitHub Actions Failure
@Chahult
Chahult had a problem deploying to workflow-approval July 30, 2026 12:17 — with GitHub Actions Failure
@NicolasFussberger
NicolasFussberger merged commit 7fb5140 into eclipse-score:main Jul 30, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in LCM - Lifecycle & Health FT Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

score_lifecycle_health: Provide MwLifeCycleManagerMock for OSS consumers

2 participants