git.delta.rocks / unique-network / refs/commits / a29bcdd8037b

difftreelog

Wait node producing blocks before all tests

Max Andreev2022-10-31parent: #f15cd67.patch.diff
in: master

1 file changed

modifiedtests/src/util/globalSetup.tsdiffbeforeafterboth
9const globalSetup = async (): Promise<void> => {9const globalSetup = async (): Promise<void> => {
10 await usingPlaygrounds(async (helper, privateKey) => {10 await usingPlaygrounds(async (helper, privateKey) => {
11 try {11 try {
12 // 1. Wait node producing blocks
13 await helper.wait.newBlocks(1);
14
12 // 1. Create donors for test files15 // 2. Create donors for test files
13 await fundFilenamesWithRetries(3)16 await fundFilenamesWithRetries(3)
14 .then((result) => {17 .then((result) => {
15 if (!result) Promise.reject();18 if (!result) Promise.reject();
16 });19 });
1720
18 // 2. Set up App Promotion admin 21 // 3. Set up App Promotion admin
19 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);22 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);
20 if (missingPallets.length === 0) {23 if (missingPallets.length === 0) {
21 const superuser = await privateKey('//Alice');24 const superuser = await privateKey('//Alice');