If you're observing memory leaks or memory pressure in your tests, a quick fix would be to restart the test JVM (and also the browser because the browser is shut down by Geb when the test JVM shuts down) every N test classes - see https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:forkEvery. The only thing is figuring out what the value of N should be - too low and it will slow down the test execution due to constant JVM restarts and too high and you will be hitting the original problem you had.
On Mon, Oct 28, 2019 at 10:49 PM jc <[email protected]> wrote: > I've been running tests in parallel with Gradle with no issues using the > maxParallelForks option with Chrome on Jenkins. However today I started > trying it with Firefox and I'm not getting great results. Towards the end > of the execution the tests become extremely slow but they don't time out > for a long time. Sometimes I'll get a WebDriverException with no message > and the rest of the tests in the class fail. > > I've been trying to troubleshoot and haven't really found a good solution > yet. The grid is a network of Windows VMs and the RAM seems to be hitting > 95+% so I'm not sure if Firefox has a memory leak. After reading through > the Book of Geb, I tried setting cacheDriverPerThread to true but that did > not seem to help. > > I'm just wondering if anyone has experienced this or if there is a best > practice for settings to use when running tests in parallel. I'd be > interested to hear what others are doing or if Marcin has any advice. > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/geb-user/5fd658f8-5d2b-40d8-9085-2740e94aeafd%40googlegroups.com > . > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQT4BF8WyNxwwhyz0QFFfEPQ1ow2JsN1sr6HOo8G4SC6Pw%40mail.gmail.com.
