1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Chore: Sync fuzzer: Add new possible actions: Adding and syncing a new temporary client on an existing account (#12741)

This commit is contained in:
Henry Heino
2025-08-18 05:57:44 -07:00
committed by GitHub
parent f02a94bef5
commit 06b681d897
4 changed files with 190 additions and 70 deletions

View File

@@ -45,6 +45,17 @@ export default class ClientPool {
];
}
public async newWithSameAccount(sourceClient: Client) {
const client = await sourceClient.createClientOnSameAccount();
this.listenForClientClose_(client);
this.clients_ = [...this.clients_, client];
return client;
}
public othersWithSameAccount(client: Client) {
return this.clients_.filter(other => other !== client && other.hasSameAccount(client));
}
public async checkState() {
for (const client of this.clients_) {
await client.checkState();