Skip to content

Commit f644004

Browse files
committed
Tests Oracle - ignore the TestRawExpressionInterpolation for Oracle
1 parent d7cc081 commit f644004

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

ebean-test/src/test/java/org/tests/basic/TestQueryForUpdate.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,38 +114,39 @@ public void testConcurrentForUpdate() throws InterruptedException {
114114
db.markAsDirty(first);
115115
db.save(first, transaction);
116116

117-
log.info("Thread: after find - size:{}", list.size());
118117
try {
119-
// hold onto the locks for 3 seconds, and then end the transaction
118+
log.info("Thread: after find - rows locked:{}, hold for 3 seconds", list.size());
120119
Thread.sleep(3000);
121120
} catch (InterruptedException e) {
122121
throw new RuntimeException(e);
123122
}
124123
log.info("Thread: done");
125-
}
124+
} // transaction ended here via try-with-resources
126125
});
127126

128127
t1.start();
129128

130129
Thread.sleep(300);
131130

132131
long start = System.currentTimeMillis();
133-
try (final Transaction transaction = db.beginTransaction()) {
132+
try (final Transaction transaction = db.beginTransaction()) { // second transaction
134133
if (isH2()) {
135134
DB.sqlUpdate("SET LOCK_TIMEOUT 5000").execute();
136135
}
137-
log.info("Main: before find, should wait ...");
136+
log.info("Main: before find, should wait (blocked by other thread) ...");
138137
DB.find(Customer.class)
139138
.usingTransaction(transaction)
140139
.forUpdate()
141140
//.orderBy().desc("1") // this would help by the locks in DB2
142141
.findList();
143142

144143
log.info("Main: complete");
145-
}
144+
} // end second transaction
146145

147146
long exeMillis = System.currentTimeMillis() - start;
148-
assertThat(exeMillis).isGreaterThan(2500);
147+
assertThat(exeMillis)
148+
.describedAs("select for update expected to wait")
149+
.isGreaterThan(2500);
149150
}
150151

151152
@Test

ebean-test/src/test/java/org/tests/el/TestRawExpressionInterpolation.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package org.tests.el;
22

3+
import io.ebean.annotation.Platform;
34
import io.ebean.xtest.BaseTestCase;
45
import io.ebean.DB;
56
import io.ebean.Query;
7+
import io.ebean.xtest.IgnorePlatform;
68
import org.junit.jupiter.api.Test;
79
import org.tests.model.basic.Customer;
810

911
class TestRawExpressionInterpolation extends BaseTestCase {
1012

13+
@IgnorePlatform(Platform.ORACLE)
1114
@Test
1215
void test() {
1316

0 commit comments

Comments
 (0)