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

    https://github.com/apache/nifi/pull/2872#discussion_r201485489
  
    --- Diff: 
nifi-testharness/src/main/java/org/apache/nifi/testharness/TestNiFiInstance.java
 ---
    @@ -0,0 +1,485 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +
    +
    +package org.apache.nifi.testharness;
    +
    +import org.apache.nifi.testharness.api.FlowFileEditorCallback;
    +import org.apache.nifi.EmbeddedNiFi;
    +import org.apache.nifi.testharness.util.FileUtils;
    +import org.apache.nifi.testharness.util.NiFiCoreLibClassLoader;
    +import org.apache.nifi.testharness.util.XmlUtils;
    +import org.apache.nifi.testharness.util.Zip;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.nio.file.Files;
    +import java.nio.file.Path;
    +
    +import java.util.Arrays;
    +import java.util.Collections;
    +import java.util.HashSet;
    +import java.util.Objects;
    +import java.util.Set;
    +import java.util.zip.ZipEntry;
    +
    +/**
    + * <p>
    + * An API wrapper of a "test" NiFi instance to which a flow definition is 
installed for testing.</p>
    + *
    + * <p>
    + * Due to NiFi design restrictions, {@code TestNiFiInstance} has to take 
<i>full command</i>
    + * of the current working directory: it installs a full NiFi installation 
to there. To ensure
    + * this is desired, <strong>it will only run if the current directory is 
called
    + * "nifi_testharness_nifi_home"</strong>. As such the JVM process has to 
be started inside a directory
    + * called "nifi_testharness_nifi_home" so that the following is true:
    + *
    + * <pre><tt>
    + *     new 
File(System.getProperty("user.dir")).getName().equals("nifi_testharness_nifi_home")
    + * </tt></pre>
    + * </p>
    + *
    + * <p>
    + * Before {@code TestNiFiInstance} can be used, it has to be configured 
via its builder
    + * interface:
    + * <ul>
    + *     <li>
    + *      {@link Builder#setFlowXmlToInstallForTesting(File)} specifies the 
location of the NiFi binary
    --- End diff --
    
    I think this should refer to `setNiFiBinaryDistributionZip` instead


---

Reply via email to