@@ -32,17 +32,17 @@ public void testCreatesBuckets() {
3232 try {
3333 HystrixRollingNumber counter = new HystrixRollingNumber (time , 200 , 10 );
3434 // confirm the initial settings
35- assertEquals (200 , counter .timeInMilliseconds . get (). intValue () );
36- assertEquals (10 , counter .numberOfBuckets . get (). intValue () );
37- assertEquals (20 , counter .getBucketSizeInMilliseconds () );
35+ assertEquals (200 , counter .timeInMilliseconds );
36+ assertEquals (10 , counter .numberOfBuckets );
37+ assertEquals (20 , counter .bucketSizeInMillseconds );
3838
3939 // we start out with 0 buckets in the queue
4040 assertEquals (0 , counter .buckets .size ());
4141
4242 // add a success in each interval which should result in all 10 buckets being created with 1 success in each
43- for (int i = 0 ; i < counter .numberOfBuckets . get () ; i ++) {
43+ for (int i = 0 ; i < counter .numberOfBuckets ; i ++) {
4444 counter .increment (HystrixRollingNumberEvent .SUCCESS );
45- time .increment (counter .getBucketSizeInMilliseconds () );
45+ time .increment (counter .bucketSizeInMillseconds );
4646 }
4747
4848 // confirm we have all 10 buckets
@@ -101,7 +101,7 @@ public void testEmptyBucketsFillIn() {
101101 assertEquals (1 , counter .buckets .size ());
102102
103103 // wait past 3 bucket time periods (the 1st bucket then 2 empty ones)
104- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
104+ time .increment (counter .bucketSizeInMillseconds * 3 );
105105
106106 // add another
107107 counter .increment (HystrixRollingNumberEvent .SUCCESS );
@@ -161,7 +161,7 @@ public void testTimeout() {
161161 assertEquals (1 , counter .getRollingSum (HystrixRollingNumberEvent .TIMEOUT ));
162162
163163 // sleep to get to a new bucket
164- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
164+ time .increment (counter .bucketSizeInMillseconds * 3 );
165165
166166 // incremenet again in latest bucket
167167 counter .increment (HystrixRollingNumberEvent .TIMEOUT );
@@ -198,7 +198,7 @@ public void testShortCircuited() {
198198 assertEquals (1 , counter .getRollingSum (HystrixRollingNumberEvent .SHORT_CIRCUITED ));
199199
200200 // sleep to get to a new bucket
201- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
201+ time .increment (counter .bucketSizeInMillseconds * 3 );
202202
203203 // incremenet again in latest bucket
204204 counter .increment (HystrixRollingNumberEvent .SHORT_CIRCUITED );
@@ -254,7 +254,7 @@ private void testCounterType(HystrixRollingNumberEvent type) {
254254 assertEquals (1 , counter .getRollingSum (type ));
255255
256256 // sleep to get to a new bucket
257- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
257+ time .increment (counter .bucketSizeInMillseconds * 3 );
258258
259259 // increment again in latest bucket
260260 counter .increment (type );
@@ -292,7 +292,7 @@ public void testIncrementInMultipleBuckets() {
292292 counter .increment (HystrixRollingNumberEvent .SHORT_CIRCUITED );
293293
294294 // sleep to get to a new bucket
295- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
295+ time .increment (counter .bucketSizeInMillseconds * 3 );
296296
297297 // increment
298298 counter .increment (HystrixRollingNumberEvent .SUCCESS );
@@ -319,7 +319,7 @@ public void testIncrementInMultipleBuckets() {
319319 assertEquals (2 , counter .getRollingSum (HystrixRollingNumberEvent .SHORT_CIRCUITED ));
320320
321321 // wait until window passes
322- time .increment (counter .timeInMilliseconds . get () );
322+ time .increment (counter .timeInMilliseconds );
323323
324324 // increment
325325 counter .increment (HystrixRollingNumberEvent .SUCCESS );
@@ -350,7 +350,7 @@ public void testCounterRetrievalRefreshesBuckets() {
350350 counter .increment (HystrixRollingNumberEvent .FAILURE );
351351
352352 // sleep to get to a new bucket
353- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
353+ time .increment (counter .bucketSizeInMillseconds * 3 );
354354
355355 // we should have 1 bucket since nothing has triggered the update of buckets in the elapsed time
356356 assertEquals (1 , counter .buckets .size ());
@@ -363,7 +363,7 @@ public void testCounterRetrievalRefreshesBuckets() {
363363 assertEquals (4 , counter .buckets .size ());
364364
365365 // wait until window passes
366- time .increment (counter .timeInMilliseconds . get () );
366+ time .increment (counter .timeInMilliseconds );
367367
368368 // the total counts should all be 0 (and the buckets cleared by the get, not only increment)
369369 assertEquals (0 , counter .getRollingSum (HystrixRollingNumberEvent .SUCCESS ));
@@ -399,7 +399,7 @@ public void testUpdateMax1() {
399399 assertEquals (10 , counter .getRollingMaxValue (HystrixRollingNumberEvent .THREAD_MAX_ACTIVE ));
400400
401401 // sleep to get to a new bucket
402- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
402+ time .increment (counter .bucketSizeInMillseconds * 3 );
403403
404404 // increment again in latest bucket
405405 counter .updateRollingMax (HystrixRollingNumberEvent .THREAD_MAX_ACTIVE , 20 );
@@ -442,7 +442,7 @@ public void testUpdateMax2() {
442442 assertEquals (30 , counter .getRollingMaxValue (HystrixRollingNumberEvent .THREAD_MAX_ACTIVE ));
443443
444444 // sleep to get to a new bucket
445- time .increment (counter .getBucketSizeInMilliseconds () * 3 );
445+ time .increment (counter .bucketSizeInMillseconds * 3 );
446446
447447 counter .updateRollingMax (HystrixRollingNumberEvent .THREAD_MAX_ACTIVE , 30 );
448448 counter .updateRollingMax (HystrixRollingNumberEvent .THREAD_MAX_ACTIVE , 30 );
@@ -479,17 +479,17 @@ public void testMaxValue() {
479479 counter .updateRollingMax (type , 10 );
480480
481481 // sleep to get to a new bucket
482- time .increment (counter .getBucketSizeInMilliseconds () );
482+ time .increment (counter .bucketSizeInMillseconds );
483483
484484 counter .updateRollingMax (type , 30 );
485485
486486 // sleep to get to a new bucket
487- time .increment (counter .getBucketSizeInMilliseconds () );
487+ time .increment (counter .bucketSizeInMillseconds );
488488
489489 counter .updateRollingMax (type , 40 );
490490
491491 // sleep to get to a new bucket
492- time .increment (counter .getBucketSizeInMilliseconds () );
492+ time .increment (counter .bucketSizeInMillseconds );
493493
494494 counter .updateRollingMax (type , 15 );
495495
@@ -535,7 +535,7 @@ public void testRolling() {
535535 // first bucket
536536 counter .getCurrentBucket ();
537537 try {
538- time .increment (counter .getBucketSizeInMilliseconds () );
538+ time .increment (counter .bucketSizeInMillseconds );
539539 } catch (Exception e ) {
540540 // ignore
541541 }
@@ -562,7 +562,7 @@ public void testCumulativeCounterAfterRolling() {
562562 // first bucket
563563 counter .increment (type );
564564 try {
565- time .increment (counter .getBucketSizeInMilliseconds () );
565+ time .increment (counter .bucketSizeInMillseconds );
566566 } catch (Exception e ) {
567567 // ignore
568568 }
@@ -590,7 +590,7 @@ public void testCumulativeCounterAfterRollingAndReset() {
590590 // first bucket
591591 counter .increment (type );
592592 try {
593- time .increment (counter .getBucketSizeInMilliseconds () );
593+ time .increment (counter .bucketSizeInMillseconds );
594594 } catch (Exception e ) {
595595 // ignore
596596 }
@@ -625,7 +625,7 @@ public void testCumulativeCounterAfterRollingAndReset2() {
625625 // iterate over 20 buckets on a queue sized for 2
626626 for (int i = 0 ; i < 20 ; i ++) {
627627 try {
628- time .increment (counter .getBucketSizeInMilliseconds () );
628+ time .increment (counter .bucketSizeInMillseconds );
629629 } catch (Exception e ) {
630630 // ignore
631631 }
@@ -660,7 +660,7 @@ public void testCumulativeCounterAfterRollingAndReset3() {
660660 // iterate over 20 buckets on a queue sized for 2
661661 for (int i = 0 ; i < 20 ; i ++) {
662662 try {
663- time .increment (counter .getBucketSizeInMilliseconds () );
663+ time .increment (counter .bucketSizeInMillseconds );
664664 } catch (Exception e ) {
665665 // ignore
666666 }
0 commit comments