I recently split multiple tests from a single file into different ones in order to speed up my tests. I noticed that my brand new Mac Studio ultra was only slightly faster than my aging iMac Pro of 2017. Since tests in a file are not run in parallel, the splitting allows for faster execution.
Now one interesting thing is the name of tests split across the 4 files all start with jetstream -.
Running tests like this:
> deno test -r -A --filter "jetstream - term reason"
Check file:///Users/aricart/src/github.com/nats-io/nats.deno/jetstream/tests/consumeropts_test.ts
Check file:///Users/aricart/src/github.com/nats-io/nats.deno/jetstream/tests/consumers_test.ts
...
running 1 test from ./jetstream/tests/jetstream_fetchconsumer_test.ts
jetstream - term reason ... ok (131ms)
running 1 test from ./jetstream/tests/jetstream_pullconsumer_test.ts
jetstream - term reason ... ok (131ms)
running 1 test from ./jetstream/tests/jetstream_pushconsumer_test.ts
jetstream - term reason ... ok (129ms)
running 1 test from ./jetstream/tests/jetstream_test.ts
jetstream - term reason ... ok (130ms)
ok | 4 passed | 0 failed | 924 filtered out (1s)
The interesting thing is that jetstream - term reason only exists in one file:
grep "jetstream - term reason" jetstream/tests/*.ts
jetstream/tests/jetstream_test.ts:Deno.test("jetstream - term reason", async () => {
However the test runner is very happy to execute the same test 4 times and report 925 tests (that number is inflated)
I recently split multiple tests from a single file into different ones in order to speed up my tests. I noticed that my brand new Mac Studio ultra was only slightly faster than my aging iMac Pro of 2017. Since tests in a file are not run in parallel, the splitting allows for faster execution.
Now one interesting thing is the name of tests split across the 4 files all start with
jetstream -
.Running tests like this:
The interesting thing is that
jetstream - term reason
only exists in one file:However the test runner is very happy to execute the same test 4 times and report 925 tests (that number is inflated)
This is in
But is also reproducible on 1.36.4