shimless_rma: Use TestUserSessionManager [chromium/src : main]

0 views
Skip to first unread message

Achuith Bhandarkar (Gerrit)

unread,
Jul 2, 2026, 2:44:40 AM (6 days ago) Jul 2
to Hidehiko Abe, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
Attention needed from Hidehiko Abe

Achuith Bhandarkar added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Achuith Bhandarkar . resolved

Split out from large CL. PTAL, Hidehiko-san

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
Gerrit-Change-Number: 8033904
Gerrit-PatchSet: 4
Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Jul 2026 06:44:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Hidehiko Abe (Gerrit)

unread,
Jul 6, 2026, 1:13:46 AM (2 days ago) Jul 6
to Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
Attention needed from Achuith Bhandarkar

Hidehiko Abe added 2 comments

File ash/webui/shimless_rma/backend/shimless_rma_service_unittest.cc
Line 127, Patchset 4 (Latest): : user_session_manager_(
Hidehiko Abe . unresolved

as you're resetting this in TearDown(), could you set it up in SetUp() to keep the consistency?

Line 175, Patchset 4 (Latest): // Destroy UserSessionManager after SessionManager (inside TearDown) to
Open in Gerrit

Related details

Attention is currently required from:
  • Achuith Bhandarkar
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
    Gerrit-Change-Number: 8033904
    Gerrit-PatchSet: 4
    Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Attention: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Comment-Date: Mon, 06 Jul 2026 05:13:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Achuith Bhandarkar (Gerrit)

    unread,
    Jul 6, 2026, 2:04:35 AM (2 days ago) Jul 6
    to Hidehiko Abe, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
    Attention needed from Hidehiko Abe

    Achuith Bhandarkar added 2 comments

    File ash/webui/shimless_rma/backend/shimless_rma_service_unittest.cc
    Line 127, Patchset 4: : user_session_manager_(
    Hidehiko Abe . unresolved

    as you're resetting this in TearDown(), could you set it up in SetUp() to keep the consistency?

    Achuith Bhandarkar

    The problem is that AshTestHelper also creates a SessionManager if one doesn't exist (NoSessionAshTestBase::SetUp() calls AshTestBase::SetUp(), which instantiates AshTestHelper), so we have to do this early. I can add a comment here to explain this unless there's some other way to approach this.

    Line 175, Patchset 4: // Destroy UserSessionManager after SessionManager (inside TearDown) to
    Achuith Bhandarkar

    This is the problem:
    https://source.chromium.org/chromium/chromium/src/+/main:ash/test/ash_test_helper.cc;l=132-137

    So AshTestHelper can touch the sessionmanager, so we should destroy the user_session_manager_ last. (I've updated the comment to be more clear).

    We don't have to do it this way because the internal session_manager unique pointer in AshTestHelper is set to null so it should not be a problem.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
    Gerrit-Change-Number: 8033904
    Gerrit-PatchSet: 4
    Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Mon, 06 Jul 2026 06:04:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hidehiko Abe (Gerrit)

    unread,
    Jul 6, 2026, 2:54:55 AM (2 days ago) Jul 6
    to Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
    Attention needed from Achuith Bhandarkar

    Hidehiko Abe added 2 comments

    File ash/webui/shimless_rma/backend/shimless_rma_service_unittest.cc
    Line 127, Patchset 4: : user_session_manager_(
    Hidehiko Abe . unresolved

    as you're resetting this in TearDown(), could you set it up in SetUp() to keep the consistency?

    Achuith Bhandarkar

    The problem is that AshTestHelper also creates a SessionManager if one doesn't exist (NoSessionAshTestBase::SetUp() calls AshTestBase::SetUp(), which instantiates AshTestHelper), so we have to do this early. I can add a comment here to explain this unless there's some other way to approach this.

    Hidehiko Abe

    Also, you can still put the initialization statement in SetUp() of this class, but still earlier than NoSessionAShTestBase::SetUp().

    Line 175, Patchset 4: // Destroy UserSessionManager after SessionManager (inside TearDown) to
    Hidehiko Abe . unresolved

    ditto

    https://chromium-review.git.corp.google.com/c/chromium/src/+/8027383/comment/3b0c24bb_60acb22a/

    Achuith Bhandarkar

    This is the problem:
    https://source.chromium.org/chromium/chromium/src/+/main:ash/test/ash_test_helper.cc;l=132-137

    So AshTestHelper can touch the sessionmanager, so we should destroy the user_session_manager_ last. (I've updated the comment to be more clear).

    We don't have to do it this way because the internal session_manager unique pointer in AshTestHelper is set to null so it should not be a problem.

    Attention is currently required from:
    • Achuith Bhandarkar
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
    Gerrit-Change-Number: 8033904
    Gerrit-PatchSet: 5
    Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Attention: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Comment-Date: Mon, 06 Jul 2026 06:54:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Achuith Bhandarkar <ach...@chromium.org>
    Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Achuith Bhandarkar (Gerrit)

    unread,
    6:10 AM (5 hours ago) 6:10 AM
    to Hidehiko Abe, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
    Attention needed from Hidehiko Abe

    Achuith Bhandarkar added 5 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Achuith Bhandarkar . resolved

    PTAL hidehiko-san

    File ash/webui/shimless_rma/backend/shimless_rma_service_unittest.cc
    Line 127, Patchset 4: : user_session_manager_(
    Hidehiko Abe . resolved

    as you're resetting this in TearDown(), could you set it up in SetUp() to keep the consistency?

    Achuith Bhandarkar

    The problem is that AshTestHelper also creates a SessionManager if one doesn't exist (NoSessionAshTestBase::SetUp() calls AshTestBase::SetUp(), which instantiates AshTestHelper), so we have to do this early. I can add a comment here to explain this unless there's some other way to approach this.

    Hidehiko Abe

    Also, you can still put the initialization statement in SetUp() of this class, but still earlier than NoSessionAShTestBase::SetUp().

    Achuith Bhandarkar

    Done

    Line 136, Patchset 6 (Latest): FakeRmadClientForTest::Initialize();
    Achuith Bhandarkar . resolved

    DBUS services should be initialized first

    Line 174, Patchset 6 (Latest): user_session_manager_.reset();
    Achuith Bhandarkar . resolved

    This should be in reverse order.

    Line 175, Patchset 4: // Destroy UserSessionManager after SessionManager (inside TearDown) to
    Hidehiko Abe . resolved

    ditto

    https://chromium-review.git.corp.google.com/c/chromium/src/+/8027383/comment/3b0c24bb_60acb22a/

    Achuith Bhandarkar

    This is the problem:
    https://source.chromium.org/chromium/chromium/src/+/main:ash/test/ash_test_helper.cc;l=132-137

    So AshTestHelper can touch the sessionmanager, so we should destroy the user_session_manager_ last. (I've updated the comment to be more clear).

    We don't have to do it this way because the internal session_manager unique pointer in AshTestHelper is set to null so it should not be a problem.

    Hidehiko Abe

    PTAL: https://chromium-review.git.corp.google.com/c/chromium/src/+/8027383/comment/edda6be9_536b41a6/

    Achuith Bhandarkar

    Ok, I have tried to initialize services in SetUp to match prod, and destruct in reverse order in TearDown.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
      Gerrit-Change-Number: 8033904
      Gerrit-PatchSet: 6
      Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 10:10:31 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hidehiko Abe (Gerrit)

      unread,
      8:17 AM (3 hours ago) 8:17 AM
      to Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com
      Attention needed from Achuith Bhandarkar

      Hidehiko Abe voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Achuith Bhandarkar
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
        Gerrit-Change-Number: 8033904
        Gerrit-PatchSet: 6
        Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Attention: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 12:17:14 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Achuith Bhandarkar (Gerrit)

        unread,
        9:38 AM (1 hour ago) 9:38 AM
        to Hidehiko Abe, Chromium LUCI CQ, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com

        Achuith Bhandarkar voted and added 1 comment

        Votes added by Achuith Bhandarkar

        Commit-Queue+2

        1 comment

        Patchset-level comments
        Achuith Bhandarkar . resolved

        Ty

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
        Gerrit-Change-Number: 8033904
        Gerrit-PatchSet: 6
        Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 13:38:21 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        9:42 AM (1 hour ago) 9:42 AM
        to Achuith Bhandarkar, Hidehiko Abe, chromium...@chromium.org, jimmyxgong+w...@chromium.org, michaelcheco+...@google.com

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        shimless_rma: Use TestUserSessionManager

        Replaces FakeUserManager and ScopedUserManager with
        TestUserSessionManager to manage user sessions in
        ShimlessRmaServiceTest.
        Bug: 268078468
        Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
        Reviewed-by: Hidehiko Abe <hide...@chromium.org>
        Commit-Queue: Achuith Bhandarkar <ach...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1658695}
        Files:
        • M ash/webui/shimless_rma/DEPS
        • M ash/webui/shimless_rma/backend/BUILD.gn
        • M ash/webui/shimless_rma/backend/shimless_rma_service_unittest.cc
        Change size: S
        Delta: 3 files changed, 22 insertions(+), 15 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Hidehiko Abe
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib100d0d86853231667ac0d78432bf3c6ce82a852
        Gerrit-Change-Number: 8033904
        Gerrit-PatchSet: 7
        Gerrit-Owner: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages