Skip to content

Commit

Permalink
test only - Fix tests due to automatic inline comment included in gen…
Browse files Browse the repository at this point in the history
…erated sql like:

select /* TestQueryDefaultBatchSize.test_findEach_details__lazy */ t0.order_id, t0.id,

select /* TestQueryDefaultBatchSize.test_findEach_details__lazy */ t0.order_id
  • Loading branch information
rbygrave committed Feb 26, 2025
1 parent d041818 commit 3845861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ public void testWithLazyBatchSize() {
List<String> loggedSql = LoggedSql.stop();

assertEquals(3, loggedSql.size());
assertThat(trimSql(loggedSql.get(0), 7)).contains("select t0.id, t0.status, t0.order_date, t1.id, t1.name from o_order t0 join o_customer t1");
assertThat(trimSql(loggedSql.get(1), 7)).contains("select t0.order_id, t0.id, t0.order_qty, t0.ship_qty, t0.unit_price");
assertThat(trimSql(loggedSql.get(2), 7)).contains("select t0.order_id, t0.id, t0.ship_time, t0.cretime, t0.updtime, t0.version, t0.order_id from or_order_ship");
assertThat(trimSql(loggedSql.get(0), 7)).contains(" t0.id, t0.status, t0.order_date, t1.id, t1.name from o_order t0 join o_customer t1");
assertThat(trimSql(loggedSql.get(1), 7)).contains(" t0.order_id, t0.id, t0.order_qty, t0.ship_qty, t0.unit_price");
assertThat(trimSql(loggedSql.get(2), 7)).contains(" t0.order_id, t0.id, t0.ship_time, t0.cretime, t0.updtime, t0.version, t0.order_id from or_order_ship");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void checkWithLazyLoadingOnBuiltInMany() {

String lazyLoadSql = loggedSql.get(1);
// contains the foreign key back to the parent bean (t0.order_id)
assertThat(trimSql(lazyLoadSql, 2)).contains("select t0.order_id, t0.id");
assertThat(trimSql(lazyLoadSql, 2)).contains(" t0.order_id, t0.id");
assertThat(lazyLoadSql).contains("order by t0.order_id, t0.id, t0.order_qty, t0.cretime desc");

}
Expand Down

0 comments on commit 3845861

Please sign in to comment.