Skip to content

Commit c562f21

Browse files
committed
Minor clean up in the Hibernate Reactive benchmark
1 parent ec368ac commit c562f21

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • frameworks/Java/quarkus/resteasy-reactive-hibernate-reactive/src/main/java/io/quarkus/benchmark/repository

frameworks/Java/quarkus/resteasy-reactive-hibernate-reactive/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public Uni<List<World>> findStateless(Mutiny.StatelessSession s, int count) {
4949
for (int i = 0; i < count; i++) {
5050
loopRoot = loopRoot.chain(() -> s.get(World.class, localRandom.getNextRandom()).invoke(worlds::add).replaceWithVoid());
5151
}
52-
return loopRoot.map(v -> worlds);
52+
return loopRoot.replaceWith(() -> worlds);
5353
}
5454

5555
public Uni<List<World>> findManaged(Mutiny.Session s, int count) {
@@ -63,11 +63,6 @@ public Uni<List<World>> findManaged(Mutiny.Session s, int count) {
6363
for (int i = 0; i < count; i++) {
6464
loopRoot = loopRoot.chain(() -> s.find(World.class, localRandom.getNextRandom()).invoke(worlds::add).replaceWithVoid());
6565
}
66-
return loopRoot.map(v -> worlds);
66+
return loopRoot.replaceWith(() -> worlds);
6767
}
68-
69-
public Uni<World> findStateless() {
70-
return inStatelessSession(session -> session.get(World.class, Randomizer.current().getNextRandom()));
71-
}
72-
7368
}

0 commit comments

Comments
 (0)