[6.7] Fix esArchiver timeout (#31322) (#31344)

Backports the following commits to 6.7:
 - Fix esArchiver timeout  (#31322)
This commit is contained in:
Spencer 2019-02-15 20:05:00 -08:00 committed by GitHub
parent 0166043917
commit bc5e1a81e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -126,8 +126,8 @@ describe('esArchiver: createIndexDocRecordsStream()', () => {
client.assertNoPendingResponses();
});
it('sends a maximum of 1000 documents at a time', async () => {
const records = createPersonDocRecords(1001);
it('sends a maximum of 300 documents at a time', async () => {
const records = createPersonDocRecords(301);
const stats = createStubStats();
const client = createStubClient([
async (name, params) => {
@ -137,7 +137,7 @@ describe('esArchiver: createIndexDocRecordsStream()', () => {
},
async (name, params) => {
expect(name).to.be('bulk');
expect(params.body.length).to.eql(999 * 2);
expect(params.body.length).to.eql(299 * 2);
return { ok: true };
},
async (name, params) => {

View file

@ -45,7 +45,7 @@ export function createIndexDocRecordsStream(client, stats) {
}
return new Writable({
highWaterMark: 1000,
highWaterMark: 300,
objectMode: true,
async write(record, enc, callback) {