Open bajtos opened 4 years ago
@bajtos, given the long list, I'm thinking this might be better to turn this issue as an epic so that we can estimate on the smaller tasks. WDYT?
@dhmlau
given the long list, I'm thinking this might be better to turn this issue as an epic so that we can estimate on the smaller tasks.
Sure, I am fine to convert this story into an epic.
I think the first two items have been already solved by https://github.com/strongloop/loopback-next/pull/5721. Can you @raymondfeng please confirm?
Most of the remaining items are for relation tests. I think it would be best to do a short spike to find out the root cause and then decide how to plan the follow-up work. I opened a new GH issue for the spike - see https://github.com/strongloop/loopback-next/issues/6017
Besides lb4 relation
tests, there are also:
Maybe we can create another spike for lb4 copyright
?
Most of our test suite is running pretty fast, with individual tests finishing under 100ms. However, there are also several slow tests that take more than 1 second to finish. These tests are typically end-to-end/acceptance-level tests that are running running child processes,
npm install
and so on. As a result,npm test
takes too long to complete (about 3 minutes on my machine).Let's find a way how to reorganize our code base so that these slow tests can be put into "acceptance" or "end-to-end" group, excluded from
npm test
and have a dedicated CI job to run them in parallel with other CI tasks, as we are already doing foracceptance/repository-mysql
and friends. (Alternatively, we can run the slow acceptance tests after the faster tests passed succesfully.)acceptance
folder, e.g.acceptance/cli-e2e-tests
and move the slow tests there. This should be easy to implement, but requires more work to introduce e2e tests for new packages.npm test
. For example, we can introducesrc/__acceptance__
directory for such tests.Personally, I think the second option is much better.
List of very slow tests
Tests that take longer than one second to complete, sorted from the slowest:
npm test
for the generated project: 12441msNice to have
lb4 relation
tests so slow. Do they have expensive setup? Can we find a more efficient way how to test the relation generator?