@@ -41,15 +41,15 @@ public class RetryParamsTest {
41
41
42
42
@ Test
43
43
public void testDefaults () {
44
- RetryParams params1 = RetryParams .getDefaultInstance ();
44
+ RetryParams params1 = RetryParams .defaultInstance ();
45
45
RetryParams params2 = RetryParams .builder ().build ();
46
46
for (RetryParams params : Arrays .asList (params1 , params2 )) {
47
- assertEquals (DEFAULT_INITIAL_RETRY_DELAY_MILLIS , params .getInitialRetryDelayMillis ());
48
- assertEquals (DEFAULT_MAX_RETRY_DELAY_MILLIS , params .getMaxRetryDelayMillis ());
49
- assertEquals (DEFAULT_RETRY_DELAY_BACKOFF_FACTOR , params .getRetryDelayBackoffFactor (), 0 );
50
- assertEquals (DEFAULT_RETRY_MAX_ATTEMPTS , params .getRetryMaxAttempts ());
51
- assertEquals (DEFAULT_RETRY_MIN_ATTEMPTS , params .getRetryMinAttempts ());
52
- assertEquals (DEFAULT_TOTAL_RETRY_PERIOD_MILLIS , params .getTotalRetryPeriodMillis ());
47
+ assertEquals (DEFAULT_INITIAL_RETRY_DELAY_MILLIS , params .initialRetryDelayMillis ());
48
+ assertEquals (DEFAULT_MAX_RETRY_DELAY_MILLIS , params .maxRetryDelayMillis ());
49
+ assertEquals (DEFAULT_RETRY_DELAY_BACKOFF_FACTOR , params .retryDelayBackoffFactor (), 0 );
50
+ assertEquals (DEFAULT_RETRY_MAX_ATTEMPTS , params .retryMaxAttempts ());
51
+ assertEquals (DEFAULT_RETRY_MIN_ATTEMPTS , params .retryMinAttempts ());
52
+ assertEquals (DEFAULT_TOTAL_RETRY_PERIOD_MILLIS , params .totalRetryPeriodMillis ());
53
53
}
54
54
}
55
55
@@ -65,12 +65,12 @@ public void testSetAndCopy() {
65
65
RetryParams params1 = builder .build ();
66
66
RetryParams params2 = new RetryParams .Builder (params1 ).build ();
67
67
for (RetryParams params : Arrays .asList (params1 , params2 )) {
68
- assertEquals (101 , params .getInitialRetryDelayMillis ());
69
- assertEquals (102 , params .getMaxRetryDelayMillis ());
70
- assertEquals (103 , params .getRetryDelayBackoffFactor (), 0 );
71
- assertEquals (107 , params .getRetryMinAttempts ());
72
- assertEquals (108 , params .getRetryMaxAttempts ());
73
- assertEquals (109 , params .getTotalRetryPeriodMillis ());
68
+ assertEquals (101 , params .initialRetryDelayMillis ());
69
+ assertEquals (102 , params .maxRetryDelayMillis ());
70
+ assertEquals (103 , params .retryDelayBackoffFactor (), 0 );
71
+ assertEquals (107 , params .retryMinAttempts ());
72
+ assertEquals (108 , params .retryMaxAttempts ());
73
+ assertEquals (109 , params .totalRetryPeriodMillis ());
74
74
}
75
75
}
76
76
@@ -79,19 +79,19 @@ public void testBadSettings() {
79
79
RetryParams .Builder builder = RetryParams .builder ();
80
80
builder .initialRetryDelayMillis (-1 );
81
81
builder = assertFailure (builder );
82
- builder .maxRetryDelayMillis (RetryParams .getDefaultInstance ().getInitialRetryDelayMillis () - 1 );
82
+ builder .maxRetryDelayMillis (RetryParams .defaultInstance ().initialRetryDelayMillis () - 1 );
83
83
builder = assertFailure (builder );
84
84
builder .retryDelayBackoffFactor (-1 );
85
85
builder = assertFailure (builder );
86
86
builder .retryMinAttempts (-1 );
87
87
builder = assertFailure (builder );
88
- builder .retryMaxAttempts (RetryParams .getDefaultInstance ().getRetryMinAttempts () - 1 );
88
+ builder .retryMaxAttempts (RetryParams .defaultInstance ().retryMinAttempts () - 1 );
89
89
builder = assertFailure (builder );
90
90
builder .totalRetryPeriodMillis (-1 );
91
91
builder = assertFailure (builder );
92
92
// verify that it is OK for min and max to be equal
93
- builder .retryMaxAttempts (RetryParams .getDefaultInstance ().getRetryMinAttempts ());
94
- builder .maxRetryDelayMillis (RetryParams .getDefaultInstance ().getInitialRetryDelayMillis ());
93
+ builder .retryMaxAttempts (RetryParams .defaultInstance ().retryMinAttempts ());
94
+ builder .maxRetryDelayMillis (RetryParams .defaultInstance ().initialRetryDelayMillis ());
95
95
builder .build ();
96
96
}
97
97
0 commit comments