Fix(ish) race conditions in server tests

This commit is contained in:
Scott Erickson 2016-06-20 15:00:29 -07:00
parent 99bae92fcb
commit d829d15528
2 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ if (database.generateMongoConnectionString() !== dbString) {
throw Error('Stopping server tests because db connection string was not as expected.');
}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 10; // for long Stripe tests
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 15; // for long Stripe tests
require('../server/common'); // Make sure global testing functions are set up
// Ignore Stripe/Nocking erroring

View file

@ -403,10 +403,10 @@ describe 'Clans', ->
loginNewUser (user2) ->
user2.set 'stripe.free', true
user2.save (err) ->
request.put {uri: "#{clanURL}/#{clan.id}/join" }, (err, res, body) ->
expect(err).toBeNull()
expect(res.statusCode).toBe(200)
done()
request.put {uri: "#{clanURL}/#{clan.id}/join" }, (err, res, body) ->
expect(err).toBeNull()
expect(res.statusCode).toBe(200)
done()
it 'Join clan when not premium 403', (done) ->
loginNewUser (user1) ->