79457098

Date: 2025-02-21 10:46:05
Score: 0.5
Natty:
Report link

I faced the same issue and spend a few hours attempting to understand the root cause. I have tried to change the memory limits as suggested above. Simply put, I have tried everything, but it didn't help me.

Then I got an idea that I should try to run another test and bingo! It worked as usual. Then I decided to rewrite the "problematic" test from scratch. During rewriting I caught myself thinking that I forgot to mock/define some dependencies of the class under testing.

Recently, I added Clock to my class

private final Clock clock;

After defining this dependency in the test class the issue has gone

var clock = Clock.fixed(Instant.now(), ZoneOffset.UTC);

I see that the question was asked a couple of years ago, but I believe it could be useful for someone.

Reasons:
  • Blacklisted phrase (1): ve tried everything
  • Blacklisted phrase (1): help me
  • Whitelisted phrase (-1): It worked
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Anton Kozytskyi