Skip to content

Commit e693b12

Browse files
committed
Tests DB2 - ignore TestRawExpressionInterpolation for DB2
1 parent 48fb9b3 commit e693b12

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

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

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919

2020
public class TestQueryForUpdate extends BaseTestCase {
2121

22-
private static final Logger log = LoggerFactory.getLogger("testConcurrentForUpdate");
23-
private static final Logger log2 = LoggerFactory.getLogger("repeatableRead");
22+
private static final Logger log = LoggerFactory.getLogger(TestQueryForUpdate.class);
2423

2524
@Test
2625
public void testForUpdate() {
@@ -45,7 +44,7 @@ public void testForUpdate() {
4544
}
4645
}
4746

48-
// Nah, nothing to do with repeatable read here
47+
// Nah, nothing to do with repeatable read here
4948
@ForPlatform(Platform.YUGABYTE)
5049
@Test
5150
void concurrentForUpdate() throws InterruptedException {
@@ -56,19 +55,19 @@ void concurrentForUpdate() throws InterruptedException {
5655
@Override
5756
public void run() {
5857
try (final Transaction transaction = db.createTransaction(TxIsolation.REPEATABLE_READ)) {
59-
log2.info("(REPEATABLE_READ) Thread: before find");
58+
log.info("(REPEATABLE_READ) Thread: before find");
6059
List<Country> list = DB.find(Country.class)
6160
.usingTransaction(transaction)
6261
.forUpdate()
6362
.findList();
6463

6564
try {
66-
log2.info("(REPEATABLE_READ) Thread: after find - size:{}, hold locks for some time", list.size());
65+
log.info("(REPEATABLE_READ) Thread: after find - size:{}, hold locks for some time", list.size());
6766
Thread.sleep(500);
6867
} catch (InterruptedException e) {
6968
throw new RuntimeException(e);
7069
}
71-
log2.info("(REPEATABLE_READ) Thread: done, release locks");
70+
log.info("(REPEATABLE_READ) Thread: done, release locks");
7271
}
7372
}
7473
};
@@ -78,13 +77,13 @@ public void run() {
7877

7978
long start = System.currentTimeMillis();
8079
try (final Transaction transaction = db.createTransaction(TxIsolation.REPEATABLE_READ)) {
81-
log2.info("(REPEATABLE_READ) Main: before find, should wait for locks to be released...");
80+
log.info("(REPEATABLE_READ) Main: before find, should wait for locks to be released...");
8281
DB.find(Country.class)
8382
.usingTransaction(transaction)
8483
.forUpdate()
8584
.findList();
8685

87-
log2.info("(REPEATABLE_READ) Main: complete");
86+
log.info("(REPEATABLE_READ) Main: complete");
8887
}
8988

9089
long exeMillis = System.currentTimeMillis() - start;
@@ -103,14 +102,8 @@ public void testConcurrentForUpdate() throws InterruptedException {
103102
List<Customer> list = DB.find(Customer.class)
104103
.usingTransaction(transaction)
105104
.forUpdate()
106-
// .orderBy().desc("1") // this would help by the locks in DB2
107105
.findList();
108106

109-
// yugabyte: performing an update does not change the behaviour
110-
Customer first = list.get(0);
111-
db.markAsDirty(first);
112-
db.save(first, transaction);
113-
114107
try {
115108
log.info("Thread: after find - rows locked:{}, hold for 700ms", list.size());
116109
Thread.sleep(600); // 3000

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestRawExpressionInterpolation extends BaseTestCase {
1212

13-
@IgnorePlatform(Platform.ORACLE)
13+
@IgnorePlatform({Platform.ORACLE, Platform.DB2})
1414
@Test
1515
void test() {
1616

0 commit comments

Comments
 (0)