Skip to content

Commit

Permalink
test(batching#176): increase parallel test timeout while increasing t…
Browse files Browse the repository at this point in the history
…hreads as well, for Node v4
  • Loading branch information
DxCx committed Jan 23, 2017
1 parent cbcc361 commit 71235a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/graphql-server-integration-testsuite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,18 +471,20 @@ export default (createApp: CreateAppFunc, destroyApp?: DestroyAppFunc) => {

it('can handle batch requests in parallel', function() {
// this test will fail due to timeout if running serially.
this.timeout(300);
const parallels = 100;
const delayPerReq = 40;
this.timeout(1000);

app = createApp();
const expected = Array(10).fill({
const expected = Array(parallels).fill({
data: { testStringWithDelay: 'it works' },
});
const req = request(app)
.post('/graphql')
.send(Array(10).fill({
.send(Array(parallels).fill({
query: `query test($delay: Int!) { testStringWithDelay(delay: $delay) }`,
operationName: 'test',
variables: { delay: 40 },
variables: { delay: delayPerReq },
}));
return req.then((res) => {
expect(res.status).to.equal(200);
Expand Down

0 comments on commit 71235a1

Please sign in to comment.