mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 11:12:23 +00:00
Minor modification of Long to long
This commit is contained in:
1 parent
01b85b9721
commit
4e236f6da8
2 files changed
+2
-4
No files matched your search
@@ -61,7 +61,7 @@ public final class CallsCount {
|
||||
* @param tenantName name of the tenant.
|
||||
* @return the count of the tenant.
|
||||
*/
|
||||
public static Long getCount(String tenantName) {
|
||||
public static long getCount(String tenantName) {
|
||||
return tenantCallsCount.get(tenantName).get();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,10 @@ public class B2BServiceTest {
|
||||
Throttler timer = new ThrottleTimerImpl(100);
|
||||
B2BService service = new B2BService(timer);
|
||||
|
||||
long counter = 0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
service.dummyCustomerApi(tenant);
|
||||
counter = CallsCount.getCount(tenant.getName());
|
||||
}
|
||||
|
||||
long counter = CallsCount.getCount(tenant.getName());
|
||||
Assert.assertTrue("Counter limit must be reached", counter == 2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user