Skip to content

Commit 9f5a0e6

Browse files
committed
Add test
1 parent ce1f3d7 commit 9f5a0e6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/ArrowFlightJdbcDriverTest.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,30 @@ public void testConnectWithInsensitiveCasePropertyKeys2() throws Exception {
201201
}
202202
}
203203

204+
/**
205+
* Tests whether the {@link ArrowFlightJdbcDriver} can establish a successful connection to the
206+
* Arrow Flight client when provided with null properties.
207+
*/
208+
@Test
209+
public void testConnectWithNullProperties() throws Exception {
210+
final Driver driver = new ArrowFlightJdbcDriver();
211+
try (Connection connection =
212+
driver.connect(
213+
"jdbc:arrow-flight://"
214+
+ dataSource.getConfig().getHost()
215+
+ ":"
216+
+ dataSource.getConfig().getPort()
217+
+ "?"
218+
+ "useEncryption=false"
219+
+ "&user="
220+
+ dataSource.getConfig().getUser()
221+
+ "&password="
222+
+ dataSource.getConfig().getPassword(),
223+
null)) {
224+
assertTrue(connection.isValid(300));
225+
}
226+
}
227+
204228
/**
205229
* Tests whether an exception is thrown upon attempting to connect to a malformed URI.
206230
*

0 commit comments

Comments
 (0)