Denovo1998 commented on code in PR #25247:
URL: https://github.com/apache/pulsar/pull/25247#discussion_r2810440127
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/resourcegroup/ResourceQuotaCalculatorImplTest.java:
##########
@@ -113,6 +113,9 @@ public void testRQCalcGlobUsedZeroTest() throws
PulsarAdminException {
@Test
public void testNeedToReportLocalUsage() {
+ // This field is 0 when the schedulers of `ResourceGroupService` are
not started, then `needToReportLocalUsage`
+ // will always return true. Set it to a non-zero value to test the
percentage change logic.
+ ResourceGroupService.maxIntervalForSuppressingReportsMSecs = 60 *
1000L; // 1 minute
Review Comment:
Should maxIntervalForSuppressingReportsMSecs be saved and restored here?
(Although it appears that only this test directly depends on it)
```java
long old = ResourceGroupService.maxIntervalForSuppressingReportsMSecs;
try {
ResourceGroupService.maxIntervalForSuppressingReportsMSecs =
TimeUnit.MINUTES.toMillis(1);
// asserts...
} finally {
ResourceGroupService.maxIntervalForSuppressingReportsMSecs = old;
}
```
--
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]