提交 87ad9f21 authored 作者: Thomas Mueller's avatar Thomas Mueller

Investigate why closing a file sometimes takes 45 seconds (see also…

Investigate why closing a file sometimes takes 45 seconds (see also http://stackoverflow.com/questions/4760809/closing-a-randomaccessfile-sometimes-takes-exactly-45-seconds)
上级 29799c2e
......@@ -322,7 +322,7 @@ java org.h2.test.TestAll timer
SelfDestructor.startCountdown(3 * 60);
long time = System.currentTimeMillis();
TestAll test = new TestAll();
test.printSystem();
test.printSystemInfo();
System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true");
......@@ -723,13 +723,17 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
FileSystemDisk.getInstance().deleteRecursive(TestBase.BASE_TEST_DIR, true);
}
private void printSystem() {
/**
* Print system information.
*/
public static void printSystemInfo() {
Properties prop = System.getProperties();
System.out.println("H2 " + Constants.getFullVersion() + " @ " + new java.sql.Timestamp(System.currentTimeMillis()).toString());
System.out.println("Java " +
prop.getProperty("java.runtime.version") + ", " +
prop.getProperty("java.vm.name")+", " +
prop.getProperty("java.vendor"));
prop.getProperty("java.vendor") + ", " +
prop.getProperty("sun.arch.data.model"));
System.out.println(
prop.getProperty("os.name") + ", " +
prop.getProperty("os.arch")+", "+
......
......@@ -11,6 +11,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.CountDownLatch;
import org.h2.test.TestAll;
import org.h2.test.TestBase;
import org.h2.util.Task;
......@@ -31,6 +32,7 @@ public class CopyOfTestMvccMultiThreaded extends TestBase {
}
public void test() throws Exception {
TestAll.printSystemInfo();
int test;
if (config.big && !config.networked)
for(int i=0; ; i++) {
......@@ -81,7 +83,8 @@ try{
}
}catch(Exception e) {
// System.out.println(buff);
e.printStackTrace(System.out);
System.out.println(e.toString());
// e.printStackTrace(System.out);
}
long time = System.currentTimeMillis() - startThread;
//if (time > 10000) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论