This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a8fe3b  KNOX-1990 - Testing non-existing/non-parsable JAAS 
configuration in sequential order even if parallel test execution is enabled 
(#133)
8a8fe3b is described below

commit 8a8fe3b6d0ebf9671a1ccc065ccf12c86ca30c3c
Author: Sandor Molnar <[email protected]>
AuthorDate: Sun Aug 25 18:50:56 2019 +0200

    KNOX-1990 - Testing non-existing/non-parsable JAAS configuration in 
sequential order even if parallel test execution is enabled (#133)
---
 .../zk/RemoteConfigurationRegistryJAASConfigTest.java      | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryJAASConfigTest.java
 
b/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryJAASConfigTest.java
index 8685808..7c4808a 100644
--- 
a/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryJAASConfigTest.java
+++ 
b/gateway-service-remoteconfig/src/test/java/org/apache/knox/gateway/service/config/remote/zk/RemoteConfigurationRegistryJAASConfigTest.java
@@ -185,7 +185,13 @@ public class RemoteConfigurationRegistryJAASConfigTest {
     }
 
     @Test
-    public void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeRead() 
throws Exception {
+    public void 
shouldRaiseAnErrorWithMeaningfulErrorMessageInCaseOfJAASConfigError() throws 
Exception {
+      
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeRead();
+      
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeParsed();
+      
shouldRaiseAnErrorWithMeaningfulErrorMessageIfReferencedKeytabFileDoesNotExists();
+    }
+
+    private void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeRead() 
throws Exception {
       final List<RemoteConfigurationRegistryConfig> registryConfigs = new 
ArrayList<>();
       System.setProperty(GatewayConfig.KRB5_LOGIN_CONFIG, 
"nonExistingFilePath");
 
@@ -200,8 +206,7 @@ public class RemoteConfigurationRegistryJAASConfigTest {
       }
     }
 
-    @Test
-    public void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeParsed() 
throws Exception {
+    private void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfAuthLoginConfigCannotBeParsed() 
throws Exception {
       final List<RemoteConfigurationRegistryConfig> registryConfigs = new 
ArrayList<>();
       final String jaasConfigFilePath = writeInvalidJaasConf(false, 
"jaasConfWithInvalidKeytab", createTempKeytabFile("invalidKeytab"));
       System.setProperty(GatewayConfig.KRB5_LOGIN_CONFIG, jaasConfigFilePath);
@@ -217,8 +222,7 @@ public class RemoteConfigurationRegistryJAASConfigTest {
       }
     }
 
-    @Test
-    public void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfReferencedKeytabFileDoesNotExists()
 throws Exception {
+    private void 
shouldRaiseAnErrorWithMeaningfulErrorMessageIfReferencedKeytabFileDoesNotExists()
 throws Exception {
       final String jaasConfigFilePath = writeInvalidJaasConf(true, 
"jaasConfWithMissingKeytab", "nonExistingKeytabFile");
       System.setProperty(GatewayConfig.KRB5_LOGIN_CONFIG, jaasConfigFilePath);
 

Reply via email to