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

Formatting, code conventions

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