Two tests that fail often. Give em a little more time. (#3453)

This commit is contained in:
Arthur Cinader
2017-02-08 10:06:42 -08:00
committed by GitHub
parent e32a37c2ec
commit 4979503f63
3 changed files with 24 additions and 15 deletions

View File

@@ -156,8 +156,9 @@ describe("Cloud Code Logger", () => {
.save()
.then(
() => done.fail('this is not supposed to succeed'),
() => logController.getLogs({ from: Date.now() - 500, size: 1000 })
() => new Promise(resolve => setTimeout(resolve, 100))
)
.then(() => logController.getLogs({ from: Date.now() - 500, size: 1000 }))
.then(logs => {
const log = logs[1]; // 0 is the 'uh oh!' from rejection...
expect(log.level).toEqual('error');