3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches
Bjarne Koll d9699b5935
Configure mokitor Server mock as stubOnly (#8861)
A recent patch moved the internal unit tests to mokito, allowing
deep mocking to easily setup a mocked server instance.
While this change is useful, the server's Server#getItemFactory methods
is one of the hottest paths during unit testing, being called numerous
times by material tests.
As mokito mocks keep track of each invocation to allow for verifications
of invocations down the line, the server mock allocates a huge amount of
memory to keep track of all invocations, ultimately leading to an OOM
exception.

The previous solution solved this by increasing the tests memory to 2 GB,
however as of right now simply configuring the server mock as "stubOnly",
properly prevents the overflow of invocation records as none of the unit
test code relies on invocation verification.
2023-02-21 17:18:49 +01:00
..
api Redefine Cyclic Dependencies (#8873) 2023-02-20 19:09:38 -06:00
removed Paper Plugins (#8108) 2023-02-19 08:57:10 -06:00
server Configure mokitor Server mock as stubOnly (#8861) 2023-02-21 17:18:49 +01:00