Skip to content

Use unique service names in renderer_server_test#1433

Merged
hiroyuki-komatsu merged 1 commit intogoogle:masterfrom
ciceroaware:issue_1421
Mar 27, 2026
Merged

Use unique service names in renderer_server_test#1433
hiroyuki-komatsu merged 1 commit intogoogle:masterfrom
ciceroaware:issue_1421

Conversation

@yukawa
Copy link
Copy Markdown
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.
@hiroyuki-komatsu hiroyuki-komatsu merged commit 858f8c0 into google:master Mar 27, 2026
1 check passed
@hiroyuki-komatsu
Copy link
Copy Markdown
Collaborator

We have merged the PR. Thank you for your contribution!

@yukawa yukawa deleted the issue_1421 branch March 27, 2026 03:39
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

2 participants