Merge branch 'nico/try-canceling-async-task-in-archive-test' into 'main'

fix: (potentially) a race in the archive test

See merge request famedly/company/frontend/famedlysdk!1083
This commit is contained in:
td 2022-07-21 06:16:10 +00:00
commit 32d84dde1d
1 changed files with 1 additions and 1 deletions

View File

@ -340,9 +340,9 @@ void main() {
}); });
test('get archive', () async { test('get archive', () async {
await matrix.abortSync();
final archive = await matrix.loadArchive(); final archive = await matrix.loadArchive();
await Future.delayed(Duration(milliseconds: 50));
expect(archive.length, 2); expect(archive.length, 2);
expect(archive[0].id, '!5345234234:example.com'); expect(archive[0].id, '!5345234234:example.com');
expect(archive[0].membership, Membership.leave); expect(archive[0].membership, Membership.leave);