Skip to content

Commit 8624160

Browse files
Alexander Tochinschauder
authored andcommitted
fix
1 parent dc353bd commit 8624160

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AbstractJdbcAggregateTemplateIntegrationTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ void findAllByQueryWithConflictingSort() {
249249

250250
CriteriaDefinition criteria = CriteriaDefinition.empty();
251251
Query query = Query.query(criteria);
252-
query.sort(Sort.by(Sort.Direction.ASC, "id"));
252+
query = query.sort(Sort.by(Sort.Direction.ASC, "id"));
253+
query = query.offset(23);
254+
query = query.limit(11);
253255

254256
Pageable pageable = PageRequest.of(0, 3, Sort.by(Sort.Direction.DESC, "name"));
255257

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/SqlGeneratorUnitTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,9 @@ void selectByQueryWithRedundantPagination() {
975975

976976
Criteria criteria = Criteria.where("name").is(probe.name);
977977
Query query = Query.query(criteria);
978-
query.sort(Sort.by(Sort.Order.asc("id")));
979-
query.offset(23);
980-
query.limit(11);
978+
query = query.sort(Sort.by(Sort.Order.asc("id")));
979+
query = query.offset(23);
980+
query = query.limit(11);
981981

982982
PageRequest pageRequest = PageRequest.of(2, 1, Sort.by(Sort.Order.asc("name")));
983983

@@ -991,7 +991,8 @@ void selectByQueryWithRedundantPagination() {
991991
.containsIgnoringCase("LIMIT 1") //
992992
.containsIgnoringCase("OFFSET 2 LIMIT 1") //
993993
.doesNotContainIgnoringCase("LIMIT 11") //
994-
.doesNotContainIgnoringCase("OFFSET 23");
994+
.doesNotContainIgnoringCase("OFFSET 23")
995+
.doesNotContainIgnoringCase("dummy_entity.id1 ASC");
995996

996997
assertThat(parameterSource.getValues()) //
997998
.containsOnly(entry("x_name", probe.name));

0 commit comments

Comments
 (0)