提交 508b1a2e authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting, code conventions

上级 616ffae4
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
package org.h2.mvstore.db; package org.h2.mvstore.db;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
......
...@@ -336,7 +336,7 @@ public class SourceCompiler { ...@@ -336,7 +336,7 @@ public class SourceCompiler {
}.execute(); }.execute();
} }
private synchronized static void javacSun(File javaFile) { private static synchronized void javacSun(File javaFile) {
PrintStream old = System.err; PrintStream old = System.err;
ByteArrayOutputStream buff = new ByteArrayOutputStream(); ByteArrayOutputStream buff = new ByteArrayOutputStream();
PrintStream temp = new PrintStream(buff); PrintStream temp = new PrintStream(buff);
......
...@@ -319,6 +319,11 @@ java org.h2.test.TestAll timer ...@@ -319,6 +319,11 @@ java org.h2.test.TestAll timer
*/ */
public boolean nestedJoins; public boolean nestedJoins;
/**
* If only fast tests should be run. If enabled, SSL is not tested.
*/
public boolean fast;
/** /**
* If the transaction log should be kept small (that is, the log should be * If the transaction log should be kept small (that is, the log should be
* switched early). * switched early).
...@@ -345,11 +350,6 @@ java org.h2.test.TestAll timer ...@@ -345,11 +350,6 @@ java org.h2.test.TestAll timer
*/ */
boolean endless; boolean endless;
/**
* If only fast tests should be run. If enabled, SSL is not tested.
*/
public boolean fast;
/** /**
* The THROTTLE value to use. * The THROTTLE value to use.
*/ */
...@@ -380,10 +380,10 @@ java org.h2.test.TestAll timer ...@@ -380,10 +380,10 @@ java org.h2.test.TestAll timer
*/ */
AbbaLockingDetector abbaLockingDetector; AbbaLockingDetector abbaLockingDetector;
private Server server;
ArrayList<TestBase> tests = New.arrayList(); ArrayList<TestBase> tests = New.arrayList();
private Server server;
/** /**
* Run all tests. * Run all tests.
* *
...@@ -863,7 +863,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -863,7 +863,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
private void runAddedTests(int threadCount) { private void runAddedTests(int threadCount) {
Task[] tasks = new Task[threadCount]; Task[] tasks = new Task[threadCount];
for (int i=0; i<threadCount;i++) { for (int i = 0; i < threadCount; i++) {
Task t = new Task() { Task t = new Task() {
@Override @Override
public void call() throws Exception { public void call() throws Exception {
...@@ -882,7 +882,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1` ...@@ -882,7 +882,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
t.execute(); t.execute();
tasks[i] = t; tasks[i] = t;
} }
for(Task t : tasks) { for (Task t : tasks) {
t.get(); t.get();
} }
} }
......
...@@ -51,14 +51,14 @@ public abstract class TestBase { ...@@ -51,14 +51,14 @@ public abstract class TestBase {
public static final String BASE_TEST_DIR = "./data"; public static final String BASE_TEST_DIR = "./data";
/** /**
* The temporary directory. * An id used to create unique file names.
*/ */
private static final String TEMP_DIR = "./data/temp"; protected static int uniqueId;
/** /**
* An id used to create unique file names. * The temporary directory.
*/ */
protected static int uniqueId; private static final String TEMP_DIR = "./data/temp";
/** /**
* The base directory to write test databases. * The base directory to write test databases.
...@@ -1012,7 +1012,7 @@ public abstract class TestBase { ...@@ -1012,7 +1012,7 @@ public abstract class TestBase {
protected void assertThrows(String expectedErrorMessage, Statement stat, protected void assertThrows(String expectedErrorMessage, Statement stat,
String sql) { String sql) {
try { try {
stat.executeQuery(sql); stat.execute(sql);
fail("Expected error: " + expectedErrorMessage); fail("Expected error: " + expectedErrorMessage);
} catch (SQLException ex) { } catch (SQLException ex) {
assertStartsWith(ex.getMessage(), expectedErrorMessage); assertStartsWith(ex.getMessage(), expectedErrorMessage);
......
...@@ -13,6 +13,9 @@ import java.util.Locale; ...@@ -13,6 +13,9 @@ import java.util.Locale;
import org.h2.test.TestBase; import org.h2.test.TestBase;
/**
* Tests that change the default locale.
*/
public class TestLocale extends TestBase { public class TestLocale extends TestBase {
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论