|
19 | 19 | import static org.assertj.core.api.Assumptions.*;
|
20 | 20 | import static org.awaitility.Awaitility.*;
|
21 | 21 |
|
22 | | -import java.text.DecimalFormat; |
23 | 22 | import java.time.Duration;
|
24 | 23 | import java.util.Arrays;
|
25 | 24 | import java.util.Collection;
|
26 | 25 | import java.util.HashMap;
|
27 | | -import java.util.Locale; |
28 | 26 | import java.util.Map;
|
29 | 27 | import java.util.concurrent.TimeUnit;
|
30 | 28 |
|
@@ -117,13 +115,11 @@ void testIncrementDouble() {
|
117 | 115 |
|
118 | 116 | valueOps.set(key, (V) value);
|
119 | 117 |
|
120 | | - DecimalFormat twoDForm = (DecimalFormat) DecimalFormat.getInstance(Locale.US); |
121 | | - |
122 | | - assertThat(valueOps.increment(key, 1.4)).isEqualTo(Double.valueOf(twoDForm.format((Double) value + 1.4))); |
123 | | - assertThat((Double) valueOps.get(key)).isBetween(value + 1.3, value + 1.4); |
| 118 | + assertThat(valueOps.increment(key, 1.4)).isBetween(value + 1.39, value + 1.41); |
| 119 | + assertThat((Double) valueOps.get(key)).isBetween(value + 1.39, value + 1.41); |
124 | 120 |
|
125 | 121 | valueOps.increment(key, -10d);
|
126 | | - assertThat((Double) valueOps.get(key)).isBetween(value + 1.3 - 10, value + 1.4 - 10); |
| 122 | + assertThat((Double) valueOps.get(key)).isBetween(value + 1.39 - 10, value + 1.41 - 10); |
127 | 123 | }
|
128 | 124 |
|
129 | 125 | @ParameterizedRedisTest // DATAREDIS-784
|
|
0 commit comments