From 40ed0da8b3e3cbc571ef88e96de9855328293d6f Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 6 Feb 2026 20:27:47 +1300 Subject: [PATCH] fix: Fix testUpdateAccountNameSearch for parallel execution Use assertGreaterThanOrEqual and find user by ID instead of assuming position Co-Authored-By: Claude Opus 4.5 --- .../Services/Account/AccountCustomClientTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index c5ed5640db..27a1109dde 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -2980,8 +2980,18 @@ class AccountCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']); $this->assertNotEmpty($response['body']['users']); - $this->assertCount(2, $response['body']['users']); - $this->assertEquals($newName, $response['body']['users'][1]['name']); + // In parallel execution, there may be more users with name 'Lorem' + $this->assertGreaterThanOrEqual(1, count($response['body']['users'])); + // Find our user in the results + $foundUser = null; + foreach ($response['body']['users'] as $user) { + if ($user['$id'] === $id) { + $foundUser = $user; + break; + } + } + $this->assertNotNull($foundUser, 'User should be found in search results'); + $this->assertEquals($newName, $foundUser['name']); $response = $this->client->call(Client::METHOD_GET, '/users', [ 'content-type' => 'application/json',