Fix flaky bsearch test (#99277)

* Fix flaky bsearch test

* Review feedback
This commit is contained in:
Lukas Olson 2021-05-06 16:31:24 -07:00 committed by GitHub
parent 822708b27c
commit d882cd6bba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,12 +46,12 @@ export default function ({ getService }: FtrProviderContext) {
expect(resp.status).to.be(200);
expect(jsonBody.id).to.be(0);
expect(jsonBody.result.isPartial).to.be(false);
expect(jsonBody.result.isRunning).to.be(false);
expect(jsonBody.result).to.have.property('isPartial');
expect(jsonBody.result).to.have.property('isRunning');
expect(jsonBody.result).to.have.property('rawResponse');
});
it('should return a batch of successful resposes', async () => {
it('should return a batch of successful responses', async () => {
const resp = await supertest.post(`/internal/bsearch`).send({
batch: [
{
@ -83,8 +83,8 @@ export default function ({ getService }: FtrProviderContext) {
const parsedResponse = parseBfetchResponse(resp);
expect(parsedResponse).to.have.length(2);
parsedResponse.forEach((responseJson) => {
expect(responseJson.result.isPartial).to.be(false);
expect(responseJson.result.isRunning).to.be(false);
expect(responseJson.result).to.have.property('isPartial');
expect(responseJson.result).to.have.property('isRunning');
expect(responseJson.result).to.have.property('rawResponse');
});
});