anchor icon indicating copy to clipboard operation
anchor copied to clipboard

cli: run tests in multiple processes

Open yf-castel opened this issue 2 years ago • 2 comments

For projects with many independent test cases, running tests takes painfully long. Since test cases are independent, we can run all of them in parallel against one single instance of test validator. This PR implements:

  1. a new cmd line option, mp_test, to run tests in parallel.
  2. a new option in Anchor.toml, mptest, which specifies the details of multi-process test.

mptest.cmd: the command used to run the tests mptest.tests: path to the folder that contains all test cases. Each test case is a single .ts file.

We launch a single instance of test validator, and launch one process for each .ts file.

yf-castel avatar Jul 19 '22 09:07 yf-castel

@yf-castel is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jul 19 '22 09:07 vercel[bot]

Linking this to the relevant GH issue: https://github.com/coral-xyz/anchor/issues/637

charlieyou avatar Jul 22 '22 15:07 charlieyou

At minimum this needs a new tests or to be applied to one of the existing tests with multiple test suites. Plus a changelog entry.

Henry-E avatar Dec 12 '22 14:12 Henry-E