mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 16:08:34 +01:00
Move a number of sync messages to jobs for retry
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { noop } from 'lodash';
|
||||
import { noop, omit } from 'lodash';
|
||||
import { HTTPError } from '../../../textsecure/Errors';
|
||||
import { SECOND } from '../../../util/durations';
|
||||
|
||||
@@ -63,6 +63,17 @@ describe('handleMultipleSendErrors', () => {
|
||||
sinon.assert.calledOnceWithExactly(markFailed);
|
||||
});
|
||||
|
||||
it("doesn't require `markFailed`", async () => {
|
||||
await assert.isRejected(
|
||||
handleMultipleSendErrors({
|
||||
...omit(defaultOptions, 'markFailed'),
|
||||
errors: [new Error('Test message')],
|
||||
isFinalAttempt: true,
|
||||
}),
|
||||
'Test message'
|
||||
);
|
||||
});
|
||||
|
||||
describe('413 handling', () => {
|
||||
it('sleeps for the longest 413 Retry-After time', async () => {
|
||||
let done = false;
|
||||
|
||||
Reference in New Issue
Block a user