Skip to content

Commit

Permalink
Follow the changes of h2 database
Browse files Browse the repository at this point in the history
  • Loading branch information
yuu-nkjm committed Nov 28, 2023
1 parent 156e90f commit 9d60b39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.nkjmlab.sorm4j.annotation.Experimental;

/**
Expand Down Expand Up @@ -31,8 +32,8 @@ public H2WebConsoleServerProperties build() {
new ArrayList<>(List.of(javaCommand, "-cp", getH2ClassPath(), "org.h2.tools.Server"));
args.addAll(List.of("-web", "-webPort", port + ""));
args.addAll(Arrays.asList(options));
args.add("-webAdminPassword");
args.add(password);
// args.add("-webAdminPassword");
// args.add(password);
return new H2WebConsoleServerProperties(
serverType, port, password, args.toArray(String[]::new));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;

class H2WebConsoleServerProcessTest {
static final org.apache.logging.log4j.Logger log =
org.apache.logging.log4j.LogManager.getLogger();

@Test
void testAwaitStart() throws StreamReadException, DatabindException, IOException {
Expand All @@ -19,6 +21,7 @@ void testAwaitStart() throws StreamReadException, DatabindException, IOException

H2WebConsoleServerProcess server = new H2WebConsoleServerProcess(prop);
server.awaitStart();
log.debug("started");
ProcessUtils.stopProcessBindingPortIfExists(prop.port);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"password": "password",
"port": 65432,
"h2ClassPath": "~/tmp/h2/h2-2.1.214.jar"
"h2ClassPath": "~/.m2/repository/com/h2database/h2/2.2.224/h2-2.2.224.jar"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"password": "password",
"port": 65431,
"h2ClassPath": "~/tmp/h2/h2-2.1.214.jar"
"h2ClassPath": "~/.m2/repository/com/h2database/h2/2.2.224/h2-2.2.224.jar"
}

0 comments on commit 9d60b39

Please sign in to comment.