@@ -51,6 +51,10 @@ public class TlsUtil {
5151 protected static final String TARGET_DIR_NAME = System .getProperty ("target.dir" , "target" );
5252 protected static final File TARGET_DIR =
5353 new File (System .getProperty ("user.dir" ), TARGET_DIR_NAME );
54+ protected static final String TEST_CLASSES_DIR_NAME =
55+ System .getProperty ("test-classes.dir" , "test-classes" );
56+ public static final File TEST_CLASSES_DIR =
57+ new File (TARGET_DIR , TEST_CLASSES_DIR_NAME );
5458 protected static final File KEYSTORE = new File (TARGET_DIR , "avatica-test-ks.jks" );
5559 protected static final File TRUSTSTORE = new File (TARGET_DIR , "avatica-test-ts.jks" );
5660
@@ -142,15 +146,6 @@ private static X509Certificate generateCertificate(String dn, KeyPair pair, int
142146 return cert ;
143147 }
144148
145- public static String getClasspathDir (Class <?> klass ) throws Exception {
146- String file = klass .getName ();
147- file = file .replace ('.' , '/' ) + ".class" ;
148- URL url = Thread .currentThread ().getContextClassLoader ().getResource (file );
149- String baseDir = url .toURI ().getPath ();
150- baseDir = baseDir .substring (0 , baseDir .length () - file .length () - 1 );
151- return baseDir ;
152- }
153-
154149 /**
155150 * Performs complete setup of SSL configuration in preparation for testing an
156151 * SSLFactory. This includes keys, certs, keystores, truststores, the server
0 commit comments