|
16 | 16 | package com.datastax.oss.driver.mapper; |
17 | 17 |
|
18 | 18 | import static com.datastax.oss.driver.assertions.Assertions.assertThat; |
| 19 | +import static org.assertj.core.data.Offset.offset; |
19 | 20 |
|
20 | 21 | import com.datastax.oss.driver.api.core.CqlIdentifier; |
21 | 22 | import com.datastax.oss.driver.api.core.CqlSession; |
@@ -113,7 +114,7 @@ public void should_return_computed_values_in_select() { |
113 | 114 | assertThat(retrievedValue.getId()).isEqualTo(key); |
114 | 115 | assertThat(retrievedValue.getcId()).isEqualTo(1); |
115 | 116 | assertThat(retrievedValue.getV()).isEqualTo(2); |
116 | | - assertThat(retrievedValue.getTtl()).isEqualTo(3600); |
| 117 | + assertThat(retrievedValue.getTtl()).isCloseTo(3600, offset(10)); |
117 | 118 | assertThat(retrievedValue.getWritetime()).isEqualTo(time); |
118 | 119 | } |
119 | 120 |
|
@@ -192,7 +193,7 @@ public void should_return_computed_values_in_GetEntity() { |
192 | 193 | assertThat(retrievedValue.getV()).isEqualTo(2); |
193 | 194 |
|
194 | 195 | // these should be set |
195 | | - assertThat(retrievedValue.getTtl()).isEqualTo(3600); |
| 196 | + assertThat(retrievedValue.getTtl()).isCloseTo(3600, offset(10)); |
196 | 197 | assertThat(retrievedValue.getWritetime()).isEqualTo(time); |
197 | 198 | } |
198 | 199 |
|
@@ -244,7 +245,7 @@ public void should_return_computed_values_in_query() { |
244 | 245 | assertThat(retrievedValue.getV()).isEqualTo(2); |
245 | 246 |
|
246 | 247 | // these should be set |
247 | | - assertThat(retrievedValue.getTtl()).isEqualTo(3600); |
| 248 | + assertThat(retrievedValue.getTtl()).isCloseTo(3600, offset(10)); |
248 | 249 | assertThat(retrievedValue.getWritetime()).isEqualTo(time); |
249 | 250 | } |
250 | 251 |
|
|
0 commit comments