Skip to content

Commit

Permalink
Polishing tcp support for port numbers.
Browse files Browse the repository at this point in the history
Related to #86
  • Loading branch information
gregturn committed Aug 15, 2019
1 parent 6bdcf8e commit 8edb8a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/r2dbc/h2/H2ConnectionConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public Builder tcp(String host, String path) {
* @param path - path of the database, e.g. {@code ~/test} resolves to {user.home}/test.db
* @return this {@link Builder}
*/
public Builder tcp(String host, String port, String path) {
public Builder tcp(String host, int port, String path) {
return url(String.format("tcp://%s:%s/%s", host, port, path));
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/r2dbc/h2/H2RemoteAccessTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void tcpWithHostnameAndPortWorks() throws IOException {
FileSystemUtils.deleteRecursively(Paths.get(System.getProperty("user.home"), "test.trace.db"));

H2ConnectionConfiguration configuration = H2ConnectionConfiguration.builder()
.tcp("localhost", "9123", "~/test")
.tcp("localhost", 9123, "~/test")
.username("sa")
.password("")
.build();
Expand Down

0 comments on commit 8edb8a6

Please sign in to comment.