Search in sources :

Example 1 with ImmutableCommitMeta

use of org.projectnessie.model.ImmutableCommitMeta in project nessie by projectnessie.

the class TestLiveCommitsSpliterator method generateCommits.

private List<LogResponse.LogEntry> generateCommits(int num) {
    List<LogResponse.LogEntry> entries = new ArrayList<>();
    IntStream.range(0, num).forEach(i -> {
        ImmutableCommitMeta commitMeta = CommitMeta.builder().hash(String.valueOf(commitId.get())).message("commit id: " + commitId.getAndIncrement()).commitTime(Instant.now()).build();
        entries.add(ImmutableLogEntry.builder().commitMeta(commitMeta).build());
    });
    return entries;
}
Also used : ImmutableCommitMeta(org.projectnessie.model.ImmutableCommitMeta) ArrayList(java.util.ArrayList) ImmutableLogEntry(org.projectnessie.model.ImmutableLogEntry)

Aggregations

ArrayList (java.util.ArrayList)1 ImmutableCommitMeta (org.projectnessie.model.ImmutableCommitMeta)1 ImmutableLogEntry (org.projectnessie.model.ImmutableLogEntry)1