mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
Fix tests only - fix tests for SqlServer
This commit is contained in:
1 parent
3244314424
commit
e8524c5b1a
3 files changed
+20
-8
No files matched your search
@@ -66,8 +66,11 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(2);
|
||||
assertThat(sql.get(0)).contains("from o_order");
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 where t0.id = ? for update");
|
||||
|
||||
if (isSqlServer()) {
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 with (updlock) where t0.id = ?");
|
||||
} else {
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 where t0.id = ? for update");
|
||||
}
|
||||
transaction.commit();
|
||||
}
|
||||
}
|
||||
@@ -98,8 +101,11 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(2);
|
||||
assertThat(sql.get(0)).contains("from o_order");
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 where t0.id = ? for update");
|
||||
|
||||
if (isSqlServer()) {
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 with (updlock,nowait) where t0.id = ?");
|
||||
} else {
|
||||
assertThat(sql.get(1)).contains("from o_customer t0 where t0.id = ? for update");
|
||||
}
|
||||
transaction.commit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user