spec(backend/notes/create): ネットワーク不安定・高負荷時ノートが重複して投稿される問題を修正 (MisskeyIO#432)
This commit is contained in:
parent
f07a701418
commit
43ef9ca4e2
6 changed files with 51 additions and 6 deletions
|
@ -8,7 +8,7 @@ process.env.NODE_ENV = 'test';
|
|||
import * as assert from 'assert';
|
||||
import { MiNote } from '@/models/Note.js';
|
||||
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
|
||||
import { api, initTestDb, post, signup, uploadFile, uploadUrl } from '../utils.js';
|
||||
import { api, initTestDb, post, sendEnvUpdateRequest, signup, uploadFile, uploadUrl } from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
||||
describe('Note', () => {
|
||||
|
@ -19,6 +19,8 @@ describe('Note', () => {
|
|||
let tom: misskey.entities.SignupResponse;
|
||||
|
||||
beforeAll(async () => {
|
||||
await sendEnvUpdateRequest({ key: 'FORCE_IGNORE_IDEMPOTENCY_FOR_TESTING', value: 'true' });
|
||||
|
||||
const connection = await initTestDb(true);
|
||||
Notes = connection.getRepository(MiNote);
|
||||
alice = await signup({ username: 'alice' });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue