question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limiting concurrency of tests

See original GitHub issue

Description

I have about 15,000 tests that I run in a single file, each of which tests a url variant through supertest. If I run the tests with --serial, they pass. However, I can only run about a few hundred tests otherwise. After that, I guess that my server chokes and can’t handle that many requests at the same time, so the tests start failing with assorted supertest errors. The tests here naturally fit in a single file due to the setup:

pages.forEach(function (page) {
    variants.forEach(function (variant) {
        langs.forEach(function (lang) {
            test.cb(...supertest(page + variant + lang)...);
        });
    });
});

In this scenario I would like to limit the test concurrency rather than the currently supported file concurrency. I’m coming from mocha, so should I be handling these differently?

Environment

node 4.4.5
ava 0.16.0
npm 2.14.9

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sindresorhuscommented, Oct 27, 2016

@capaj This is about tests, not test files.

BTW I think ava should by default limit the number of concurrent tests to the number of available procesor cores on the current machine. That way optimal performance is achieved on my experience.

We might do that for test files (see open issue about it somewhere), but it does not make sense for tests.

0reactions
fatihazizcommented, Sep 7, 2022

Any update for limiting the concurrency? I hope there is configuration for it…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest limit concurrency of integration tests - Stack Overflow
My current problem is that I have a lot of integration tests using a real database connection.
Read more >
Maximum concurrency in execution stages
Leveraging concurrency limits allows you to avoid adding excess plan stages just to limit test tests in parallel or enable stopping once you...
Read more >
Why am I not getting the parallelism/concurrency I expected?
Your account's concurrency limit is the maximum number of tests you can start at once, including automated and manual.
Read more >
Managing the Concurrent Tester Limit - Rainforest QA
Key in the concurrent tester limit in the Number of testers field. The range is 5–500. · Click the Save Global Settings button....
Read more >
What is Concurrency Testing in Software Testing? - Guru99
It relatively reduces the amount of effort needed to test an application by restricting the scope of concurrent interactions to a few widely ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found