Skip to content

Commit

Permalink
convert entities' expiration to integer in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Jun 20, 2024
1 parent 51aba1e commit 3f6c383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public void shouldReadExpirationForDocumentWithPersistenceConstructor(int conver

DocumentWithExpirationAnnotationAndPersistenceConstructor document =
aerospikeConverter.read(DocumentWithExpirationAnnotationAndPersistenceConstructor.class, forRead);
assertThat(document.getExpiration()).isCloseTo(TimeUnit.MINUTES.toSeconds(1), Offset.offset(100L));
assertThat(document.getExpiration()).isCloseTo((int) TimeUnit.MINUTES.toSeconds(1), Offset.offset(100));
}

@ParameterizedTest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ public void shouldExpire() {

@Test
public void shouldSaveAndGetDocumentWithImmutableExpiration() {
template.insert(new DocumentWithExpirationAnnotationAndPersistenceConstructor(id, 60L));
template.insert(new DocumentWithExpirationAnnotationAndPersistenceConstructor(id, 60));

DocumentWithExpirationAnnotationAndPersistenceConstructor doc = template.findById(id,
DocumentWithExpirationAnnotationAndPersistenceConstructor.class);
assertThat(doc).isNotNull();
assertThat(doc.getExpiration()).isCloseTo(60L, Offset.offset(10L));
assertThat(doc.getExpiration()).isCloseTo(60, Offset.offset(10));
}

@Test
Expand Down

0 comments on commit 3f6c383

Please sign in to comment.