提交 67ebd733 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting.

上级 7fd3b410
...@@ -282,7 +282,7 @@ public class TestLob extends TestBase { ...@@ -282,7 +282,7 @@ public class TestLob extends TestBase {
* A background task. * A background task.
*/ */
private final class Deadlock2Task1 extends Task { private final class Deadlock2Task1 extends Task {
public final Connection conn; public final Connection conn;
Deadlock2Task1() throws SQLException { Deadlock2Task1() throws SQLException {
...@@ -306,12 +306,14 @@ public class TestLob extends TestBase { ...@@ -306,12 +306,14 @@ public class TestLob extends TestBase {
} }
rs.close(); rs.close();
} catch (SQLException ex) { } catch (SQLException ex) {
// ignore "LOB gone away", this can happen in the presence of concurrent updates // ignore "LOB gone away", this can happen
// in the presence of concurrent updates
if (ex.getErrorCode() != ErrorCode.IO_EXCEPTION_2) { if (ex.getErrorCode() != ErrorCode.IO_EXCEPTION_2) {
throw ex; throw ex;
} }
} catch (IOException ex) { } catch (IOException ex) {
// ignore "LOB gone away", this can happen in the presence of concurrent updates // ignore "LOB gone away", this can happen
// in the presence of concurrent updates
Exception e = ex; Exception e = ex;
if (e.getCause() instanceof DbException) { if (e.getCause() instanceof DbException) {
e = (Exception) e.getCause(); e = (Exception) e.getCause();
...@@ -329,14 +331,14 @@ public class TestLob extends TestBase { ...@@ -329,14 +331,14 @@ public class TestLob extends TestBase {
} }
} }
} }
} }
/** /**
* A background task. * A background task.
*/ */
private final class Deadlock2Task2 extends Task { private final class Deadlock2Task2 extends Task {
public final Connection conn; public final Connection conn;
Deadlock2Task2() throws SQLException { Deadlock2Task2() throws SQLException {
...@@ -351,9 +353,9 @@ public class TestLob extends TestBase { ...@@ -351,9 +353,9 @@ public class TestLob extends TestBase {
stat.execute("update test set counter = " + random.nextInt(10) + " where id = " + random.nextInt(1000)); stat.execute("update test set counter = " + random.nextInt(10) + " where id = " + random.nextInt(1000));
} }
} }
} }
private void testDeadlock2() throws Exception { private void testDeadlock2() throws Exception {
deleteDb("lob"); deleteDb("lob");
Connection conn = getDeadlock2Connection(); Connection conn = getDeadlock2Connection();
...@@ -389,11 +391,11 @@ public class TestLob extends TestBase { ...@@ -389,11 +391,11 @@ public class TestLob extends TestBase {
task6.conn.close(); task6.conn.close();
conn.close(); conn.close();
} }
Connection getDeadlock2Connection() throws SQLException { Connection getDeadlock2Connection() throws SQLException {
return getConnection("lob;MULTI_THREADED=TRUE;LOCK_TIMEOUT=60000"); return getConnection("lob;MULTI_THREADED=TRUE;LOCK_TIMEOUT=60000");
} }
private void testCopyManyLobs() throws Exception { private void testCopyManyLobs() throws Exception {
deleteDb("lob"); deleteDb("lob");
Connection conn = getConnection("lob"); Connection conn = getConnection("lob");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论