test: replace metadata sleeps with upstream start barriers (WealthLedger/backend#63) (#102)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 15s
Backend verify / verify (push) Failing after 6m46s

This commit was merged in pull request #102.
This commit is contained in:
2026-10-15 14:46:09 +03:00
parent 7bc7d8ddec
commit ec6d9a2639
2 changed files with 25 additions and 10 deletions
+6 -2
View File
@@ -151,8 +151,12 @@ describe('Request-driven operations synchronization (SQLite)', () => {
it('joins overlapping account and instrument refresh into one atomic publication group', async () => {
const gate = deferred<TbankOperationsByCursorResponse>();
const started = deferred<void>();
upstream.getOperationsByCursor
.mockReturnValueOnce(gate.promise)
.mockImplementationOnce(() => {
started.resolve();
return gate.promise;
})
.mockResolvedValue({
hasNext: false,
items: [{ ...operation(), instrumentUid: 'uid' }],
@@ -164,7 +168,7 @@ describe('Request-driven operations synchronization (SQLite)', () => {
true,
),
);
await delay(5);
await started.promise;
const whole = requiredHandle(
await service.request('owner', [january], true),
);