Skip to content

Commit

Permalink
fix: Token distribution (#1051)
Browse files Browse the repository at this point in the history
## What ❔

Submit transactions in parallel only if using localhost

## Why ❔

To fix running tests on true L1

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
- [x] Spellcheck has been run via `zk spellcheck`.
- [x] Linkcheck has been run via `zk linkcheck`.
  • Loading branch information
Artemka374 committed Feb 13, 2024
1 parent 2ce973c commit bd63b3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/tests/ts-integration/src/context-owner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,13 @@ export class TestContextOwner {

this.reporter.debug(`Sent ${l1TxPromises.length} initial transactions on L1`);

await Promise.all(l1TxPromises);
if (this.env.network === 'localhost') {
await Promise.all(l1TxPromises);
} else {
for (const promise of l1TxPromises) {
await promise;
}
}
this.reporter.finishAction();
}

Expand Down Expand Up @@ -363,8 +369,8 @@ export class TestContextOwner {
this.reporter
);
l2TxPromises.push(...erc20Promises);

await Promise.all(l2TxPromises);

this.reporter.finishAction();
}

Expand Down

0 comments on commit bd63b3a

Please sign in to comment.