This article is a part of CQK Top 10 series. Automatic memory management in Java greatly simplifies programs and helps to avoid dangerous errors like reading from unallocated memory. However if configured improperly, it can become a performance bottleneck. Here are some of our configuration advices and anti-patterns to avoid.
In the team that develops Allegro Recommendation Platform we weren’t happy with our integration tests. Long setup and assertions blocks resulted in a low signal—to—noise ratio and poor readability. These tests were also full of ad hoc variables like 1, ABC, OK or NOK, which caused that it was hard to find a connection between input and output data. Moreover, any change in an API caused changes in many tests.