fix(backend): avoid deadlock when deleting account (#16162)

This commit is contained in:
zyoshoka
2025-06-04 19:14:11 +09:00
committed by GitHub
parent b55cc03621
commit 65ba33867b
3 changed files with 6 additions and 9 deletions

View File

@@ -380,9 +380,7 @@ describe('User', () => {
strictEqual(followers.length, 1); // followed by Bob
await alice.client.request('i/delete-account', { password: alice.password });
// NOTE: user deletion query is slow
// FIXME: ensure user is removed successfully
await sleep(10000);
await sleep();
const following = await bob.client.request('users/following', { userId: bob.id });
strictEqual(following.length, 0); // no following relation
@@ -480,9 +478,7 @@ describe('User', () => {
strictEqual(followers.length, 1); // followed by Bob
await aAdmin.client.request('admin/suspend-user', { userId: alice.id });
// NOTE: user deletion query is slow
// FIXME: ensure user is removed successfully
await sleep(10000);
await sleep();
const following = await bob.client.request('users/following', { userId: bob.id });
strictEqual(following.length, 0); // no following relation