mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Clear cookie jar between benchmark user setups
setup() runs in a single iteration, so k6 does not reset the per-VU cookie jar between the users we create. The second user's session request carried the first user's session cookie, so the server rejected it with "session already active" (401). Clear the jar after capturing each user's cookie; flows authenticate via explicit Cookie headers, so clearing the jar is safe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ea2e3b76fb
commit
e29146f9f6
1 file changed
+4
@@ -209,6 +209,10 @@ function setupUsers(projectId, count) {
|
||||
}, headers, [201], 'setup.account.session');
|
||||
|
||||
users.push({ sessionHeaders: { ...headers, Cookie: cookieHeader(session) } });
|
||||
|
||||
// Drop the auto-stored session cookie so the next user can sign in;
|
||||
// setup() runs in a single iteration, so the jar is not reset for us.
|
||||
http.cookieJar().clear(ENDPOINT);
|
||||
}
|
||||
|
||||
return users;
|
||||
|
||||
Reference in new issue
Block a user