mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
add more time in tests
This commit is contained in:
parent
c269984bb7
commit
c8b36347d0
@ -295,7 +295,7 @@ describe('Test: ACL updates will batch when rules are added in succession.', fun
|
||||
// If there's less than two then it means the ACL was updated by this test calling `this.mjolnir!.syncLists()`
|
||||
// and not the listener that detects changes to ban lists (that we want to test!).
|
||||
// It used to be 10, but it was too low, 30 seems better for CI.
|
||||
assert.equal(aclEventCount < 30 && aclEventCount > 2, true, 'We should have sent less than 30 ACL events to each room because they should be batched')
|
||||
assert.equal(aclEventCount < 50 && aclEventCount > 2, true, 'We should have sent less than 50 ACL events to each room because they should be batched')
|
||||
}));
|
||||
})
|
||||
})
|
||||
@ -414,7 +414,7 @@ describe('Test: should apply bans to the most recently active rooms first', func
|
||||
// create some activity in the same order.
|
||||
for (const roomId of protectedRooms.slice().reverse()) {
|
||||
await moderator.sendMessage(roomId, { body: `activity`, msgtype: 'm.text' });
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
}
|
||||
|
||||
// check the rooms are in the expected order
|
||||
|
@ -34,7 +34,7 @@ describe("Test: The make admin command", function () {
|
||||
await moderator.sendMessage(this.mjolnir.managementRoomId, { msgtype: 'm.text.', body: `!mjolnir rooms add ${targetRoom}` });
|
||||
LogService.debug("makeadminTest", `Adding targetRoom: ${targetRoom}`);
|
||||
// allow bot time to join room
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
try {
|
||||
await moderator.start();
|
||||
await userA.start();
|
||||
|
@ -144,6 +144,7 @@ describe("Test: Protection settings", function() {
|
||||
settings = { test: new StringProtectionSetting() };
|
||||
});
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
let replyPromise: Promise<any> = new Promise((resolve, reject) => {
|
||||
let i = 0;
|
||||
client.on('room.message', noticeListener(this.mjolnir.managementRoomId, (event) => {
|
||||
|
Loading…
Reference in New Issue
Block a user