Skip to content

Commit

Permalink
Specify Synapse ui_auth.session_timeout only on tests which require it (
Browse files Browse the repository at this point in the history
#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]>
  • Loading branch information
t3chguy authored Jan 8, 2025
1 parent 027891a commit f1899b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
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 @@ const DEFAULT_CONFIG = {
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

0 comments on commit f1899b9

Please sign in to comment.