@@ -83,7 +83,7 @@ public void testMinuteInterval() throws Exception {
83
83
84
84
public void testSecondInterval () throws Exception {
85
85
int randomSeconds = randomNonNegativeInt ();
86
- int randomMillis = randomBoolean () ? (randomBoolean () ? 0 : 999999999 ) : randomInt (999999999 );
86
+ int randomMillis = randomBoolean () ? (randomBoolean () ? 0 : 999 ) : randomInt (999 );
87
87
String value = format (Locale .ROOT , "%s%d.%d" , sign , randomSeconds , randomMillis );
88
88
TemporalAmount amount = parseInterval (EMPTY , value , INTERVAL_SECOND );
89
89
assertEquals (maybeNegate (sign , Duration .ofSeconds (randomSeconds ).plusMillis (randomMillis )), amount );
@@ -128,7 +128,7 @@ public void testDayToSecond() throws Exception {
128
128
int randomSecond = randomInt (59 );
129
129
130
130
boolean withMillis = randomBoolean ();
131
- int randomMilli = withMillis ? randomInt (999999999 ) : 0 ;
131
+ int randomMilli = withMillis ? randomInt (999 ) : 0 ;
132
132
String millisString = withMillis ? "." + randomMilli : "" ;
133
133
134
134
String value = format (Locale .ROOT , "%s%d %d:%d:%d%s" , sign , randomDay , randomHour , randomMinute , randomSecond , millisString );
@@ -151,7 +151,7 @@ public void testHourToSecond() throws Exception {
151
151
int randomSecond = randomInt (59 );
152
152
153
153
boolean withMillis = randomBoolean ();
154
- int randomMilli = withMillis ? randomInt (999999999 ) : 0 ;
154
+ int randomMilli = withMillis ? randomInt (999 ) : 0 ;
155
155
String millisString = withMillis ? "." + randomMilli : "" ;
156
156
157
157
String value = format (Locale .ROOT , "%s%d:%d:%d%s" , sign , randomHour , randomMinute , randomSecond , millisString );
@@ -165,7 +165,7 @@ public void testMinuteToSecond() throws Exception {
165
165
int randomSecond = randomInt (59 );
166
166
167
167
boolean withMillis = randomBoolean ();
168
- int randomMilli = withMillis ? randomInt (999999999 ) : 0 ;
168
+ int randomMilli = withMillis ? randomInt (999 ) : 0 ;
169
169
String millisString = withMillis ? "." + randomMilli : "" ;
170
170
171
171
String value = format (Locale .ROOT , "%s%d:%d%s" , sign , randomMinute , randomSecond , millisString );
@@ -186,11 +186,11 @@ public void testYearToMonthTooBig() throws Exception {
186
186
187
187
public void testMillisTooBig () throws Exception {
188
188
int randomSeconds = randomNonNegativeInt ();
189
- int millisTooLarge = 1234567890 ;
189
+ int millisTooLarge = 1234 ;
190
190
String value = format (Locale .ROOT , "%s%d.%d" , sign , randomSeconds , millisTooLarge );
191
191
ParsingException pe = expectThrows (ParsingException .class , () -> parseInterval (EMPTY , value , INTERVAL_SECOND ));
192
192
assertEquals ("line -1:0: Invalid [INTERVAL SECOND] value [" + value + "]: [MILLISECOND] unit has illegal value [" + millisTooLarge
193
- + "], expected a positive number up to [999999999 ]" , pe .getMessage ());
193
+ + "], expected a positive number up to [999 ]" , pe .getMessage ());
194
194
}
195
195
196
196
public void testDayToMinuteTooBig () throws Exception {
0 commit comments