Github user parthchandra commented on a diff in the pull request:

    https://github.com/apache/drill/pull/950#discussion_r142827859
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/TestSSLConfig.java ---
    @@ -49,12 +64,19 @@ public void testMissingKeystorePassword() throws 
Exception {
         ConfigBuilder config = new ConfigBuilder();
         config.put(ExecConstants.HTTP_KEYSTORE_PATH, "/root");
         config.put(ExecConstants.HTTP_KEYSTORE_PASSWORD, "");
    +    config.put(ExecConstants.SSL_USE_HADOOP_CONF, false);
    +    config.put(ExecConstants.USER_SSL_ENABLED, true);
         try {
    -      SSLConfig sslv = new SSLConfig(config.build());
    +      SSLConfig sslv = new SSLConfigBuilder()
    +          .config(config.build())
    +          .mode(SSLFactory.Mode.SERVER)
    +          .initializeSSLContext(false)
    +          .validateKeyStore(true)
    +          .build();
           fail();
           //Expected
         } catch (Exception e) {
    -      assertTrue(e instanceof DrillException);
    +
    --- End diff --
    
    If the hadoop config is invalid the build method will throw an exception. 
So we are looking to make sure the build method does, in fact, throw an 
exception. If it does the test passes, otherwise it fails.


---

Reply via email to