One more thing post merge @basil and @timja I just realized:
While debugging, I kinda saw that AetherModule is constructed twice (I may be wrong here) per test.
But in any case, I am pretty much sure that RepositorySystem is not being extended dynamically (as in added new transport, removed transport), so to me it seems likely possible you need one cached instance of RepositorySystem. There is no reason to build and then tear down it, as it is same. RepositorySystem is stateless, while RepositorySystemSession is not (!).
So I think your lengthy tests could be mildly improved, if you split the two: keep RepositorySystem across whole run (as it has huge object graph, but is stateless and you do not change it), but create RepositorySystemSession per-case basis.
Originally posted by @cstamas in #1733 (comment)
While debugging, I kinda saw that
AetherModuleis constructed twice (I may be wrong here) per test.But in any case, I am pretty much sure that
RepositorySystemis not being extended dynamically (as in added new transport, removed transport), so to me it seems likely possible you need one cached instance ofRepositorySystem. There is no reason to build and then tear down it, as it is same.RepositorySystemis stateless, whileRepositorySystemSessionis not (!).So I think your lengthy tests could be mildly improved, if you split the two: keep
RepositorySystemacross whole run (as it has huge object graph, but is stateless and you do not change it), but createRepositorySystemSessionper-case basis.Originally posted by @cstamas in #1733 (comment)