[
https://issues.apache.org/jira/browse/NIFI-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15424890#comment-15424890
]
ASF GitHub Bot commented on NIFI-2574:
--------------------------------------
Github user alopresto commented on a diff in the pull request:
https://github.com/apache/nifi/pull/872#discussion_r75161822
--- Diff:
nifi-commons/nifi-hadoop-utils/src/test/java/org/apache/nifi/hadoop/TestKerberosProperties.java
---
@@ -19,25 +19,20 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.logging.ComponentLog;
-import org.apache.nifi.util.NiFiProperties;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.File;
import java.util.List;
-import static org.mockito.Mockito.when;
-
public class TestKerberosProperties {
@Test
public void testWithKerberosConfigFile() {
final File file = new File("src/test/resources/krb5.conf");
- final NiFiProperties niFiProperties =
Mockito.mock(NiFiProperties.class);
-
when(niFiProperties.getKerberosConfigurationFile()).thenReturn(file);
- final KerberosProperties kerberosProperties =
KerberosProperties.create(niFiProperties);
+ final KerberosProperties kerberosProperties = new
KerberosProperties(file);
Assert.assertNotNull(kerberosProperties);
--- End diff --
I think there were some weird things happening during the transition from
static initialization so these are sanity checks.
> Update NiFiProperties usage to a context based accessor rather than static
> singleton
> ------------------------------------------------------------------------------------
>
> Key: NIFI-2574
> URL: https://issues.apache.org/jira/browse/NIFI-2574
> Project: Apache NiFi
> Issue Type: Sub-task
> Components: Configuration, Core Framework
> Reporter: Joseph Witt
> Assignee: Joseph Witt
> Labels: migration
> Fix For: 1.0.0
>
>
> This is a key step to move our longstanding odd static singleton usage of
> NiFiProperties which enables a loader to exist which will encapsulate all
> logic for dealing with encrypted properties as is the goal of the parent task.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)