Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Synapse ui_auth.session_timeout only on tests which require it #28939

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions playwright/e2e/settings/device-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Please see LICENSE files in the repository root for full details.
*/

import { test, expect } from "../../element-web-test";
import { uiaLongSessionTimeoutHomeserver } from "../../plugins/homeserver/synapse/uiaLongSessionTimeoutHomeserver.ts";

// This is needed to not get stopped by UIA when deleting other devices
test.use(uiaLongSessionTimeoutHomeserver);
test.describe("Device manager", () => {
test.use({
displayName: "Alice",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

import { Fixtures } from "@playwright/test";

import { Services } from "../../../services.ts";

export const uiaLongSessionTimeoutHomeserver: Fixtures<{}, Services> = {
synapseConfigOptions: [
async ({ synapseConfigOptions }, use) => {
await use({
...synapseConfigOptions,
ui_auth: {
session_timeout: "300s",
},
});
},
{ scope: "worker" },
],
};
4 changes: 1 addition & 3 deletions playwright/testcontainers/synapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@
password_config: {
enabled: true,
},
ui_auth: {
session_timeout: "300s",
},
ui_auth: {},
background_updates: {
// Inhibit background updates as this Synapse isn't long-lived
min_batch_size: 100000,
Expand Down Expand Up @@ -253,7 +251,7 @@
.createHmac("sha1", this.registrationSharedSecret)
.update(`${nonce}\0${username}\0${password}\0${admin ? "" : "not"}admin`)
.digest("hex");
const res = await this.request.post(url, {

Check failure on line 254 in playwright/testcontainers/synapse.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › crypto/invisible-crypto.spec.ts:20:9 › Invisible cryptography › Messages fail to decrypt when sender is previously verified

1) [Chrome] › crypto/invisible-crypto.spec.ts:20:9 › Invisible cryptography › Messages fail to decrypt when sender is previously verified Error: apiRequestContext.post: Target page, context or browser has been closed Call log: - → POST http://localhost:34529/_synapse/admin/v1/register - user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.6778.33 Safari/537.36 - accept: */* - accept-encoding: gzip,deflate,br - content-type: application/json - content-length: 269 at ../testcontainers/synapse.ts:254 252 | .update(`${nonce}\0${username}\0${password}\0${admin ? "" : "not"}admin`) 253 | .digest("hex"); > 254 | const res = await this.request.post(url, { | ^ 255 | data: { 256 | nonce, 257 | username, at StartedSynapseContainer.registerUserInternal (/home/runner/work/element-web/element-web/playwright/testcontainers/synapse.ts:254:40) at Bot.getCredentials (/home/runner/work/element-web/element-web/playwright/pages/bot.ts:88:28) at Bot.buildClient (/home/runner/work/element-web/element-web/playwright/pages/bot.ts:98:29) at Bot.prepareClient (/home/runner/work/element-web/element-web/playwright/pages/client.ts:43:27) at Object.bot (/home/runner/work/element-web/element-web/playwright/element-web-test.ts:218:9)
data: {
nonce,
username,
Expand Down
Loading