wilkinsona / project-generator

3 stars 4 forks source link

Move ProjectGeneratorIntegrationTests to a true integration test #17

Closed snicoll closed 5 years ago

snicoll commented 5 years ago

This test is rather long so it would be nice if we could move it so that package doesn't run it by default.

wilkinsona commented 5 years ago

I'm not sure that I agree. The tests are certainly rather long, but I'm reluctant for them to be moved to a phase where it's easy to forget to run them.

snicoll commented 5 years ago

This is a usual run for me

[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 310.171 s - in io.spring.initializr.generator.project.ProjectGeneratorIntegrationTests

Is it taking that much time for you?

wilkinsona commented 5 years ago

IIRC, it’s more like 180 seconds for me.

snicoll commented 5 years ago

I had several run this morning so the snapshots must be up to date

[INFO] Running io.spring.initializr.generator.project.ProjectGeneratorIntegrationTests
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 285.033 s - in io.spring.initializr.generator.project.ProjectGeneratorIntegrationTests

I am on a 100Mbps network so I don't think network is the problem. I don't have a fancy i9 though. Perhaps trying to run these in parallel?

wilkinsona commented 5 years ago

I like the idea of running them in parallel. Perhaps we can use this a reason to familiarise ourselves with JUnit 5 and give this a try? I think I’d like running in parallel to be opt in rather than opt out though. It looks like we can perhaps achieve that with a custom strategy.

snicoll commented 5 years ago

I've hacked something that uses JUnit 5 and the parallel mode https://github.com/wilkinsona/project-generator/commit/9aed0db32e6ea7d6a8a6b3c553bb06af8fb1109a

I can reduce the execution of ProjectGeneratorIntegrationTests from 285s to roughly 130s.

snicoll commented 5 years ago

Those tests have moved to start-site which sounds the right location for them.