提交 1d326040 authored 作者: Andrei Tokar's avatar Andrei Tokar

increase timeout for TestMultiThreadedKernel

上级 5746e5a0
...@@ -48,8 +48,7 @@ public class TestMultiThreadedKernel extends TestDb { ...@@ -48,8 +48,7 @@ public class TestMultiThreadedKernel extends TestDb {
testConcurrentRead(); testConcurrentRead();
testCache(); testCache();
deleteDb("multiThreadedKernel"); deleteDb("multiThreadedKernel");
final String url = getURL("multiThreadedKernel;" + final String url = getURL("multiThreadedKernel;DB_CLOSE_DELAY=-1", true);
"DB_CLOSE_DELAY=-1;MULTI_THREADED=1", true);
final String user = getUser(), password = getPassword(); final String user = getUser(), password = getPassword();
int len = 3; int len = 3;
Thread[] threads = new Thread[len]; Thread[] threads = new Thread[len];
...@@ -102,8 +101,7 @@ public class TestMultiThreadedKernel extends TestDb { ...@@ -102,8 +101,7 @@ public class TestMultiThreadedKernel extends TestDb {
final int count = 1000; final int count = 1000;
ArrayList<Task> list = new ArrayList<>(size); ArrayList<Task> list = new ArrayList<>(size);
final Connection[] connections = new Connection[count]; final Connection[] connections = new Connection[count];
String url = getURL("multiThreadedKernel;" + String url = getURL("multiThreadedKernel;CACHE_SIZE=16", true);
"MULTI_THREADED=TRUE;CACHE_SIZE=16", true);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
final Connection conn = DriverManager.getConnection( final Connection conn = DriverManager.getConnection(
url, getUser(), getPassword()); url, getUser(), getPassword());
...@@ -143,8 +141,7 @@ public class TestMultiThreadedKernel extends TestDb { ...@@ -143,8 +141,7 @@ public class TestMultiThreadedKernel extends TestDb {
final int count = 100; final int count = 100;
ArrayList<Task> list = new ArrayList<>(size); ArrayList<Task> list = new ArrayList<>(size);
final Connection[] connections = new Connection[count]; final Connection[] connections = new Connection[count];
String url = getURL("multiThreadedKernel;" + String url = getURL("multiThreadedKernel;CACHE_SIZE=1", true);
"MULTI_THREADED=TRUE;CACHE_SIZE=1", true);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
final Connection conn = DriverManager.getConnection( final Connection conn = DriverManager.getConnection(
url, getUser(), getPassword()); url, getUser(), getPassword());
...@@ -179,4 +176,8 @@ public class TestMultiThreadedKernel extends TestDb { ...@@ -179,4 +176,8 @@ public class TestMultiThreadedKernel extends TestDb {
} }
} }
@Override
protected String getURL(String name, boolean admin) {
return super.getURL(name + ";MULTI_THREADED=1;LOCK_TIMEOUT=2000", admin);
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论