-
Notifications
You must be signed in to change notification settings - Fork 236
Return global or per thread cache from clearCache method #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Argh, damn, seems we both missed that the driver is returned there, sorry. Seems also like some tests should be added. The "fix" you do here is flaky actually. That means that if you changed the The main question probably is, what is the use-case for returning the driver there to consider what the appropriate options are. The changes here should work properly as long as the option Actually, even the But then it also needs to be defined what actually should happen on These API were actually broken since long time ago when the thread-local cache was added in the case of config change. Btw. no, these methods are not just for for testing purposes as the reporter of the current problems assumed. They are documented ways to force Geb to create a new driver on next occasion: https://groovy.apache.org/geb/manual/current/#implicit-driver-management. It is just now a matter of interpretation of the documentation how these methods should work and what they should return if anything. Maybe it would indeed be best to just not return anything from those methods. :-/ |
I tried using CachingDriverFactory.clearCacheAndQuitDriver() in a cleanup() and with v8.0.0 the old browsers ran until the JVM shutdown. With v7 I never even got a new browser on the next test so v8 was definitely an improvement. |
With that also my initial fix could probably be reverted. |
Well it is two different configurations in a way. I think a lot broke back in v6 when the configuration per test was done away with. |
"Maybe we could enforce global or per-thread caching and not allow changes? Maybe a good topic for the mailing list." |
This is meant to address the problems highlighted in #288. These started after #270, so I'd appreciate a review from @Vampire on this, since he has a lot of context on those changes and can speak to whether this would introduce new problems.