meonkeys commented on PR #4975: URL: https://github.com/apache/fineract/pull/4975#issuecomment-3215103263
Oh nice, this new `@AfterAll` fixes `gradle :fineract-progressive-loan:test -PdbType=postgresql --tests InterestPeriodTest --tests RepaymentPeriodTest` for me. Any idea why this is _not_ failing in CI (gh actions)? I haven't completed a full test run yet, but it looks like [Paul's try-with-resources suggestion](https://lists.apache.org/thread/tfoqd7r7j9xdmj9mb786v0wdy0yw88m0) will work as well, e.g.: ```java // (removed moneyHelper declaration above) try (MockedStatic<MoneyHelper> moneyHelper = Mockito.mockStatic(MoneyHelper.class)) { moneyHelper.when(MoneyHelper::getRoundingMode).thenReturn(RoundingMode.HALF_EVEN); moneyHelper.when(MoneyHelper::getMathContext).thenReturn(MC); } // (similar fix for both InterestPeriodTest and RepaymentPeriodTest) ``` I don't know the pros & cons of this approach vs. using `@AfterAll`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
