tests: Increase timeouts instead of disabling them (#10367)

Some tests were disabled in ba799c67f9 and
10567d81e2, because they tend to
frequently time out after 8 seconds.

Instead of disabling the tests (which IMHO is bad, because tests are
there for a reason), we're now increasing the timeout to 30 seconds just
for these tests.

As requested by @paglias, I've marked the timeout functions with a @TODO
comment, so that the slow tests or the functionality they're testing are
eventually refactored.

I also needed to change the arrow notation for the test cases to use the
function keyword, because otherwise we don't have this.timeout()
available.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @paglias
This commit is contained in:
aszlig
2018-05-18 17:02:20 +02:00
committed by Matteo Pagliazzi
parent d3a0348ac7
commit 5167f847d0
2 changed files with 4 additions and 4 deletions

View File

@@ -123,8 +123,8 @@ describe('GET /challenges/:challengeId/members', () => {
}); });
}); });
// @TODO times out too many times (when it takes more than 8s) it('supports using req.query.lastId to get more members', async function () {
xit('supports using req.query.lastId to get more members', async () => { this.timeout(30000); // @TODO: times out after 8 seconds
let group = await generateGroup(user, {type: 'party', name: generateUUID()}); let group = await generateGroup(user, {type: 'party', name: generateUUID()});
let challenge = await generateChallenge(user, group); let challenge = await generateChallenge(user, group);

View File

@@ -142,8 +142,8 @@ describe('GET /groups/:groupId/members', () => {
}); });
}); });
// @TODO times out too many times (when it takes more than 8s) it('supports using req.query.lastId to get more members', async function () {
xit('supports using req.query.lastId to get more members', async () => { this.timeout(30000); // @TODO: times out after 8 seconds
let leader = await generateUser({balance: 4}); let leader = await generateUser({balance: 4});
let group = await generateGroup(leader, {type: 'guild', privacy: 'public', name: generateUUID()}); let group = await generateGroup(leader, {type: 'guild', privacy: 'public', name: generateUUID()});