Fix flaky playwright tests (#28975)
* Fix flaky tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix flaky tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix mas config Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix another flaky test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -168,6 +168,16 @@ const DEFAULT_CONFIG = {
|
||||
access_token_ttl: 300,
|
||||
compat_token_ttl: 300,
|
||||
},
|
||||
rate_limiting: {
|
||||
login: {
|
||||
burst: 10,
|
||||
per_second: 1,
|
||||
},
|
||||
registration: {
|
||||
burst: 10,
|
||||
per_second: 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export class MatrixAuthenticationServiceContainer extends GenericContainer {
|
||||
|
||||
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { AbstractStartedContainer, GenericContainer, StartedTestContainer, Wait } from "testcontainers";
|
||||
import { AbstractStartedContainer, GenericContainer, RestartOptions, StartedTestContainer, Wait } from "testcontainers";
|
||||
import { APIRequestContext } from "@playwright/test";
|
||||
import crypto from "node:crypto";
|
||||
import * as YAML from "yaml";
|
||||
@@ -239,6 +239,11 @@ export class StartedSynapseContainer extends AbstractStartedContainer implements
|
||||
super(container);
|
||||
}
|
||||
|
||||
public restart(options?: Partial<RestartOptions>): Promise<void> {
|
||||
this.adminToken = undefined;
|
||||
return super.restart(options);
|
||||
}
|
||||
|
||||
public setRequest(request: APIRequestContext): void {
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user