Skip to content

Reuse embedded OSGi container in tests#649

Merged
asfgit merged 1 commit intoapache:masterfrom
ahgittin:persist-plus
Apr 28, 2017
Merged

Reuse embedded OSGi container in tests#649
asfgit merged 1 commit intoapache:masterfrom
ahgittin:persist-plus

Conversation

@ahgittin
Copy link
Contributor

This speeds up build time from 17m to 11m on my machine by reusing OSGi framework containers where possible. That also fixes an OSGi container which is causing lots of build failures on Jenkins.

See the last commit which is the only thing new, and the OsgiManager class is the main significant difference in that. Other things are just wiring to control bundle reuse or not.

This includes #645 and #647 so if this build passes we can assume the failures in those PR's are ignorable (they seem to be due to memory leaks). But merge those before merging this (and I can rebase this if needed once they are merged.)

/cc @neykov @aledsage @geomacy

@ahgittin ahgittin mentioned this pull request Apr 25, 2017
…ory)

primary change is in OsgiManager, to leave frameworks running

build times including test reduced from 17m to 11m on my box,
saving 6m in CAMP (from 7m to 1m)!

have done some assertions that starting a framework takes 200ms each time,
plus it leaks a couple MB, so it's a bad idea to bake this in to our unit tests.
(see comments in new OsgiTestingLeaksAndSpeedTest for full details.)

have also "confirmed" that reusing a running framework has no adverse impact,
after we remove bundles that a test installs (all tests pass in reusable mode
except a few which asserted the cache dir is deleted (as it no longer is)
and these still pass in non-reusable mode)
@geomacy
Copy link
Contributor

geomacy commented Apr 28, 2017

This all looks good to me; tests all pass, with speedup (just for brooklyn-server build) on my machine from 12:20 min to 09:05 min.

Will merge.

@asfgit asfgit merged commit 881ecd5 into apache:master Apr 28, 2017
asfgit pushed a commit that referenced this pull request Apr 28, 2017
Reuse embedded OSGi container in tests

This speeds up build time from 17m to 11m on my machine by reusing OSGi framework containers where possible.  That also fixes an OSGi container which is causing lots of build failures on Jenkins.

See the last commit which is the only thing new, and the `OsgiManager` class is the main significant difference in that.  Other things are just wiring to control bundle reuse or not.

This includes #645 and #647 so if this build passes we can assume the failures in those PR's are ignorable (they seem to be due to memory leaks).  But merge those before merging this (and I can rebase this if needed once they are merged.)

/cc @neykov @aledsage @geomacy
asfgit pushed a commit that referenced this pull request Apr 28, 2017
Test speedups

Lots of little things to make tests run faster.

Builds on #649 (so we get decent test results) so it's only the last several commits which are relevant.  Will rebase once that is merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments