Skip to content

Commit 70b3d7d

Browse files
feat: add test case
1 parent 766d68d commit 70b3d7d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/java/com/influxdb/v3/client/internal/FlightSqlClientTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ void tearDown() throws Exception {
8888

8989
@Test
9090
void flightSqlClient() throws Exception {
91+
String correctHost = "grpc+unix://tmp/dummy.sock";
9192
ClientConfig clientConfig = new ClientConfig.Builder()
92-
.host("grpc+unix://tmp/dummy.sock")
93+
.host(correctHost)
9394
.token("Token".toCharArray())
9495
.build();
9596
try (FlightSqlClient flightSqlClient = new FlightSqlClient(clientConfig)) {
@@ -101,6 +102,13 @@ void flightSqlClient() throws Exception {
101102
FlightSqlClient flightSqlClient = new FlightSqlClient(clientConfig, flightClient);
102103
Assertions.assertThat(flightSqlClient).isNotNull();
103104
}
105+
106+
var inCorrectHost = "grpc+unix://///tmp/dummy.sock";
107+
ClientConfig clientConfig1 = new ClientConfig.Builder()
108+
.host(inCorrectHost)
109+
.token("Token".toCharArray())
110+
.build();
111+
Assertions.assertThatThrownBy(() -> new FlightSqlClient(clientConfig1));
104112
}
105113

106114
@Test

0 commit comments

Comments
 (0)