Fetch PNI group credentials

This commit is contained in:
Fedor Indutny 2022-07-08 13:46:25 -07:00 committed by GitHub
parent b9ba732724
commit a450e13a99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 1911 additions and 875 deletions

View file

@ -6,14 +6,8 @@ import assert from 'assert';
import { ReceiptType } from '@signalapp/mock-server';
import {
Bootstrap,
debug,
saveLogs,
stats,
RUN_COUNT,
DISCARD_COUNT,
} from './fixtures';
import type { App } from './fixtures';
import { Bootstrap, debug, stats, RUN_COUNT, DISCARD_COUNT } from './fixtures';
const CONVERSATION_SIZE = 500; // messages
@ -25,9 +19,11 @@ const LAST_MESSAGE = 'start sending messages now';
});
await bootstrap.init();
const app = await bootstrap.link();
let app: App | undefined;
try {
app = await bootstrap.link();
const { server, contacts, phone, desktop } = bootstrap;
const [first] = contacts;
@ -136,10 +132,10 @@ const LAST_MESSAGE = 'start sending messages now';
console.log('stats info=%j', { delta: stats(deltaList, [99, 99.8]) });
} catch (error) {
await saveLogs(bootstrap);
await bootstrap.saveLogs();
throw error;
} finally {
await app.close();
await app?.close();
await bootstrap.teardown();
}
})();