Skip to content

Commit 2dd6aa2

Browse files
Add hacky delay to stabilise waitlist test (#743)
1 parent e75ff92 commit 2dd6aa2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/waitlist.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import assert from 'assert';
22
import supertest from 'supertest';
33
import * as sinon from 'sinon';
4+
import delay from 'delay';
45
import randomString from 'random-string';
56
import createUwave from './utils/createUwave.mjs';
67
import testSource from './utils/testSource.mjs';
@@ -81,6 +82,8 @@ describe('Waitlist', () => {
8182
.expect(400);
8283

8384
await uw.test.connectToWebSocketAs(user);
85+
// HACK: might stabilise tests? But really it indicates a bug/race condition
86+
await delay(100);
8487

8588
await supertest(uw.server)
8689
.post('/api/waitlist')

0 commit comments

Comments
 (0)