Skip to content

Commit f1899b9

Browse files
authored
Specify Synapse ui_auth.session_timeout only on tests which require it (#28939)
* Specify Synapse ui_auth.session_timeout only on tests which require it As Dendrite lacks this configuration option Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 027891a commit f1899b9

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

playwright/e2e/settings/device-management.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ Please see LICENSE files in the repository root for full details.
77
*/
88

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

12+
// This is needed to not get stopped by UIA when deleting other devices
13+
test.use(uiaLongSessionTimeoutHomeserver);
1114
test.describe("Device manager", () => {
1215
test.use({
1316
displayName: "Alice",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2024 New Vector Ltd.
3+
4+
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
5+
Please see LICENSE files in the repository root for full details.
6+
*/
7+
8+
import { Fixtures } from "@playwright/test";
9+
10+
import { Services } from "../../../services.ts";
11+
12+
export const uiaLongSessionTimeoutHomeserver: Fixtures<{}, Services> = {
13+
synapseConfigOptions: [
14+
async ({ synapseConfigOptions }, use) => {
15+
await use({
16+
...synapseConfigOptions,
17+
ui_auth: {
18+
session_timeout: "300s",
19+
},
20+
});
21+
},
22+
{ scope: "worker" },
23+
],
24+
};

playwright/testcontainers/synapse.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ const DEFAULT_CONFIG = {
118118
password_config: {
119119
enabled: true,
120120
},
121-
ui_auth: {
122-
session_timeout: "300s",
123-
},
121+
ui_auth: {},
124122
background_updates: {
125123
// Inhibit background updates as this Synapse isn't long-lived
126124
min_batch_size: 100000,

0 commit comments

Comments
 (0)