Skip to content

Conversation

@yukawa
Copy link
Collaborator

@yukawa yukawa commented Jan 26, 2026

Description

Previously, RendererServer/RendererClient used within renderer_server_test were relying on the production service name, which could lead to test failures if a real mozc_renderer process was running.

In order to avoid such conflicts, this commit modifies the test to use a unique service name for testing as follows:

  • RendererServer is now responsible for generating a random service name when instantiated via RendererServer::CreateForTesting().

  • RendererServer now exposes its service name via GetServiceName() method.

  • RendererClient::CreateForTesting() now takes a service name as an argument, which closes the loop for using the same unique service name in tests.

This is anyway only for fixing a test. There must be no observable change in production code.

Closes #1421.

Issue IDs

Steps to test new behaviors (if any)

  • OS: Windows 11 25H2
  • Steps:
  1. Build Mozc64.msi and install it.
  2. Enable Mozc in some applications and make sure that Mozc's candidate window is shown.
  3. bazelisk test --config oss_windows -c dbg //renderer:renderer_server_test --nocache_test_results --test_output=streamed

@yukawa yukawa changed the title Use unique services name in renderer_server_test Use unique service names in renderer_server_test Jan 26, 2026
Previously, RendererServer/RendererClient used within
renderer_server_test were relying on the production service name, which
could lead to test failures if a real mozc_renderer process was running.

In order to avoid such conflicts, this commit modifies the test to use a
unique service name for testing as follows:

  - RendererServer is now responsible for generating a random service
    name when instantiated via RendererServer::CreateForTesting().

  - RendererServer now exposes its service name via GetServiceName()
    method.

  - RendererClient::CreateForTesting() now takes a service name as an
    argument, which closes the loop for using the same unique service
    name in tests.

This is anyway only for fixing a test. There must be no observable
change in production code.

Closes google#1421.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

//renderer:renderer_server_test fails when mozc_renderer is already running in Windows

1 participant