Skip to content

Commit 2faa56f

Browse files
committed
Fix flaky SCIM pagination test by limiting raw GET to count=1
The raw GET to /scim/v2/Groups was fetching the full result set just to read totalResults. On workspaces with many groups, serializing the full response exceeds the 60s read timeout, causing retries and eventual failure after 5 minutes. SCIM always returns totalResults regardless of page size, so count=1 is sufficient. Co-authored-by: Isaac
1 parent d5f5756 commit 2faa56f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration/test_iam.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def test_scim_get_user_as_dict(w):
3636
],
3737
)
3838
def test_workspace_users_list_pagination(w, path, call):
39-
raw = w.api_client.do("GET", path)
39+
# Use count=1 to avoid serializing the full result set just to read totalResults.
40+
raw = w.api_client.do("GET", path, query={"count": 1})
4041
total = raw["totalResults"]
4142
all = call(w)
4243
found = len(list(all))
@@ -61,7 +62,8 @@ def test_workspace_users_list_pagination(w, path, call):
6162
],
6263
)
6364
def test_account_users_list_pagination(a, path, call):
64-
raw = a.api_client.do("GET", path.replace("%s", a.config.account_id))
65+
# Use count=1 to avoid serializing the full result set just to read totalResults.
66+
raw = a.api_client.do("GET", path.replace("%s", a.config.account_id), query={"count": 1})
6567
total = raw["totalResults"]
6668
all = call(a)
6769
found = len(list(all))

0 commit comments

Comments
 (0)