Skip to content

Commit

Permalink
[Enhancement kbss-cvut/termit-ui#520] Replace System#currentTimeMilli…
Browse files Browse the repository at this point in the history
…s with Utils#timestamp
  • Loading branch information
lukaskabc committed Nov 24, 2024
1 parent 58302d9 commit ab07485
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void findAllRetrievesChangeRecordsRelatedToSpecifiedAsset() {
em.persist(asset, persistDescriptor(vocabulary.getUri()));
});
final List<AbstractChangeRecord> 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))));
Expand All @@ -154,7 +154,7 @@ void findAllReturnsChangeRecordsOrderedByTimestampDescending() {
enableRdfsInference(em);
final Term asset = Generator.generateTermWithId(vocabulary.getUri());
final List<AbstractChangeRecord> 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(() -> {
Expand Down

0 comments on commit ab07485

Please sign in to comment.