From ab074859fdc3e9e0f6c246b065c2fb145938542d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Ka=C5=88ka?= Date: Sun, 24 Nov 2024 11:33:46 +0100 Subject: [PATCH] [Enhancement kbss-cvut/termit-ui#520] Replace System#currentTimeMillis with Utils#timestamp --- .../persistence/dao/changetracking/ChangeRecordDaoTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/cz/cvut/kbss/termit/persistence/dao/changetracking/ChangeRecordDaoTest.java b/src/test/java/cz/cvut/kbss/termit/persistence/dao/changetracking/ChangeRecordDaoTest.java index 4fdee2b5f..2aaffee88 100644 --- a/src/test/java/cz/cvut/kbss/termit/persistence/dao/changetracking/ChangeRecordDaoTest.java +++ b/src/test/java/cz/cvut/kbss/termit/persistence/dao/changetracking/ChangeRecordDaoTest.java @@ -132,7 +132,7 @@ void findAllRetrievesChangeRecordsRelatedToSpecifiedAsset() { em.persist(asset, persistDescriptor(vocabulary.getUri())); }); final List records = IntStream.range(0, 5).mapToObj( - i -> generateUpdateRecord(Instant.ofEpochMilli(System.currentTimeMillis() - i * 10000L), + i -> generateUpdateRecord(Utils.timestamp().minusSeconds(i * 10L), asset.getUri())).collect(Collectors.toList()); final URI changeContext = contextResolver.resolveChangeTrackingContext(vocabulary); transactional(() -> records.forEach(r -> em.persist(r, persistDescriptor(changeContext)))); @@ -154,7 +154,7 @@ void findAllReturnsChangeRecordsOrderedByTimestampDescending() { enableRdfsInference(em); final Term asset = Generator.generateTermWithId(vocabulary.getUri()); final List records = IntStream.range(0, 5).mapToObj( - i -> generateUpdateRecord(Instant.ofEpochMilli(System.currentTimeMillis() + i * 10000L), + i -> generateUpdateRecord(Utils.timestamp().plusSeconds(i * 10L), asset.getUri())).collect(Collectors.toList()); final URI changeContext = contextResolver.resolveChangeTrackingContext(vocabulary); transactional(() -> {