mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-25 11:32:07 +00:00
Tests Oracle - ignore the TestRawExpressionInterpolation for Oracle
This commit is contained in:
@@ -114,15 +114,14 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
db.markAsDirty(first);
|
||||
db.save(first, transaction);
|
||||
|
||||
log.info("Thread: after find - size:{}", list.size());
|
||||
try {
|
||||
// hold onto the locks for 3 seconds, and then end the transaction
|
||||
log.info("Thread: after find - rows locked:{}, hold for 3 seconds", list.size());
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
log.info("Thread: done");
|
||||
}
|
||||
} // transaction ended here via try-with-resources
|
||||
});
|
||||
|
||||
t1.start();
|
||||
@@ -130,11 +129,11 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
Thread.sleep(300);
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
try (final Transaction transaction = db.beginTransaction()) {
|
||||
try (final Transaction transaction = db.beginTransaction()) { // second transaction
|
||||
if (isH2()) {
|
||||
DB.sqlUpdate("SET LOCK_TIMEOUT 5000").execute();
|
||||
}
|
||||
log.info("Main: before find, should wait ...");
|
||||
log.info("Main: before find, should wait (blocked by other thread) ...");
|
||||
DB.find(Customer.class)
|
||||
.usingTransaction(transaction)
|
||||
.forUpdate()
|
||||
@@ -142,10 +141,12 @@ public class TestQueryForUpdate extends BaseTestCase {
|
||||
.findList();
|
||||
|
||||
log.info("Main: complete");
|
||||
}
|
||||
} // end second transaction
|
||||
|
||||
long exeMillis = System.currentTimeMillis() - start;
|
||||
assertThat(exeMillis).isGreaterThan(2500);
|
||||
assertThat(exeMillis)
|
||||
.describedAs("select for update expected to wait")
|
||||
.isGreaterThan(2500);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package org.tests.el;
|
||||
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Query;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
|
||||
class TestRawExpressionInterpolation extends BaseTestCase {
|
||||
|
||||
@IgnorePlatform(Platform.ORACLE)
|
||||
@Test
|
||||
void test() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user