Fix Oracle OptionalSecondaryTableBatchTest#testManaged failing test

This commit is contained in:
Andrea Boriero 2022-11-30 10:40:59 +01:00 committed by Christian Beikov
parent 4aadbe801c
commit 56eb241dec
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class OptionalSecondaryTableBatchTest {
@Test
public void testManaged(SessionFactoryScope scope) {
scope.inTransaction( (session) -> {
final List<Company> companies = session.createQuery( "from Company", Company.class ).list();
final List<Company> companies = session.createQuery( "from Company order by id", Company.class ).list();
for ( int i = 0 ; i < companies.size() ; i++ ) {
final Company company = companies.get( i );
company.taxNumber = 2 * i;
@ -46,7 +46,7 @@ public class OptionalSecondaryTableBatchTest {
} );
scope.inTransaction( (session) -> {
final List<Company> companies = session.createQuery( "from Company", Company.class ).list();
final List<Company> companies = session.createQuery( "from Company order by id", Company.class ).list();
for ( int i = 0 ; i < companies.size() ; i++ ) {
assertThat( companies.get( i ).taxNumber ).isEqualTo( 2 * i );
}