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

    https://github.com/apache/nifi/pull/3100#discussion_r232267315
  
    --- Diff: 
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/RepeatingInputStream.java
 ---
    @@ -0,0 +1,103 @@
    +/*
    + * 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.stream.io;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.util.Objects;
    +
    +public class RepeatingInputStream extends InputStream {
    --- End diff --
    
    @patricker sorry - thanks for pinging! We don't know that we are trying to 
avoid `@Ignore`d tests in general necessarily. What we are trying to avoid is 
marking tests as `@Ignore` as a "solution" to tests that intermittently fail. 
Instead, those tests need to be fixed or deleted. Having a test that is 
intended to be run manually to test performance before & after a change is a 
common pattern that we follow throughout the codebase. Some people also have 
marked these types of tests as Integration Tests instead of unit tests, but I 
think that's a bad idea, as it's not truly an integration test. I'm sure there 
are better ways to handle this, but for the time being I would assert that it 
is common practice and don't believe it's unfavorable.
    
    re: the presence of the RepeatingInputStream. I do understand your 
temptation to remove it. The reason that I suggest we keep it, though, is that 
there have been many times that it would have been helpful but was not 
available so I used only a small bit of data in tests. I do think there are 
others tests in the codebase that could be updated to use this, as well. I'm 
not hell-bent on this, though, so if you still feel it should be removed, say 
the word and i'll push a commit that removes it.
    
    Thanks for the review!


---

Reply via email to