From 5ee473b84bacb72bcb02a1dabcd2dd50b1530c70 Mon Sep 17 00:00:00 2001 From: Jose Almeida Date: Wed, 16 Jun 2021 12:00:19 -0300 Subject: [PATCH] Read keyStore files with getResources --- .../apache/arrow/driver/jdbc/test/ConnectionTlsTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/ConnectionTlsTest.java b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/ConnectionTlsTest.java index fa127ce6feb14..b4bf05d4c3ebd 100644 --- a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/ConnectionTlsTest.java +++ b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/ConnectionTlsTest.java @@ -50,7 +50,10 @@ public class ConnectionTlsTest { private String serverUrl; private BufferAllocator allocator; private FlightTestUtils flightTestUtils; - private final String keyStorePath = "src/test/resources/keys/keyStore.jks"; + private final String keyStorePath = this.getClass().getResource("/keys/keyStore.jks") + .getPath(); + private final String noCertificateKeyStorePath = this.getClass().getResource("/keys/noCertificate.jks") + .getPath(); private final String keyStorePass = "flight"; @Before @@ -152,7 +155,6 @@ public void testGetEncryptedClientAuthenticated() throws Exception { */ @Test(expected = SQLException.class) public void testGetEncryptedClientWithNoCertificateOnKeyStore() throws Exception { - final String noCertificateKeyStorePath = "src/test/resources/keys/noCertificate.jks"; final String noCertificateKeyStorePassword = "flight1"; try (ArrowFlightClient client = ArrowFlightClient