Fix Persistent Connections (Issue 7230)#1106
Open
Bombe wants to merge 11 commits intohyphanet:nextfrom
Open
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
reviewed
Oct 18, 2025
Contributor
bertm
left a comment
There was a problem hiding this comment.
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.
Contributor
|
@bertm did you get to have a look at the test tooling by now? |
Contributor
|
The tests look good to me. |
Contributor
|
… but the tests fail for me … |
Contributor
|
Regarding Mockito.inline: |
Contributor
Author
Hmm. Are you sure your source directory is clean, i.e. no local modifications? |
Contributor
Author
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. 🙂 |
Contributor
9157b52 to
2e4f37d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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().