-
Notifications
You must be signed in to change notification settings - Fork 231
Fix Persistent Connections (Issue 7230) #1106
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: next
Are you sure you want to change the base?
Conversation
Unfortunately, it currently looks like we won’t be able to update to a newer version than 3, because Mockito starts using WeakReference as a type for some internal representation or other, so we can’t mock objects anymore that use it.
31cbc86 to
4ffed47
Compare
bertm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have to look into the test tooling part (but seems fine at a first glance). Here's some feedback on the fred and gradle parts.
|
@bertm did you get to have a look at the test tooling by now? |
|
The tests look good to me. |
|
… but the tests fail for me … |
|
Regarding Mockito.inline: |
Hmm. Are you sure your source directory is clean, i.e. no local modifications? |
I’m aware. We can’t use a newer version, anyway (for reasons detailed in 7865349), and this saves us creating a file in a Mockito-specific location, just so it can use the correct mock maker. 🙂 |
Bug Report: https://freenet.mantishub.io/view.php?id=7230
This branch fixes the problem outlined in the bug report mentioned above, but it also does so much more. 😁 There are four types of commits:
🧑💻 – lays groundwork for upcoming tests. This comprises a parser for HTTP responses and Hamcrest matchers for said parsed responses, allowing more expressive tests.
⬆️ – updates dependencies. This updates to the last version of Mockito that we can use (due to its inability to mock anything involving
WeakReferencestarting in version 3), allowing mocks of final classes and classes with final methods; required for mockingToadlet.findSupportedMethods()!🐛 – fixes problems I found in the
ToadletContextImpl. One of them is the one from the bug report, the other ones are small issues that I found during tests.✅ – adds additional tests.
The final barrage of tests achieves almost full coverage of the outer-most
tryblock inToadletContextImpl.handle().