Skip to content

Commit 5c2b4de

Browse files
build: Make test more stable.
1 parent 9b23c03 commit 5c2b4de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/org/springframework/data/neo4j/integration/imperative/QuerydslNeo4jPredicateExecutorIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,10 @@ void scrollByExampleWithContinuingOffset(@Autowired QueryDSLPersonRepository rep
170170
Predicate predicate = Expressions.predicate(Ops.EQ, firstNamePath, Expressions.asString("Helge"))
171171
.or(Expressions.predicate(Ops.EQ, lastNamePath, Expressions.asString("B.")));
172172

173-
Window<Person> peopleWindow = repository.findBy(predicate, q -> q.limit(1).sortBy(Sort.by("firstName").descending()).scroll(ScrollPosition.offset(0)));
173+
var firstName = Sort.by("firstName").descending();
174+
Window<Person> peopleWindow = repository.findBy(predicate, q -> q.limit(1).sortBy(firstName).scroll(ScrollPosition.offset(0)));
174175
ScrollPosition currentPosition = peopleWindow.positionAt(peopleWindow.getContent().get(0));
175-
peopleWindow = repository.findBy(predicate, q -> q.limit(1).scroll(currentPosition));
176+
peopleWindow = repository.findBy(predicate, q -> q.limit(1).sortBy(firstName).scroll(currentPosition));
176177

177178
assertThat(peopleWindow.getContent()).extracting(Person::getFirstName)
178179
.containsExactlyInAnyOrder("Bela");

0 commit comments

Comments
 (0)