mirror of
https://github.com/apache/nifi.git
synced 2025-02-07 18:48:51 +00:00
NIFI-12071 add deprecation notices to grpc processors and fix brittle test depending on certain command line output
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #7741.
This commit is contained in:
parent
5baaa2185f
commit
f7c06d39a7
@ -45,6 +45,7 @@ import org.apache.nifi.processor.exception.ProcessException;
|
||||
import org.apache.nifi.processor.util.StandardValidators;
|
||||
import org.apache.nifi.processors.grpc.ssl.SslContextProvider;
|
||||
import org.apache.nifi.ssl.SSLContextService;
|
||||
import org.apache.nifi.annotation.documentation.DeprecationNotice;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.InetAddress;
|
||||
@ -74,6 +75,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
@WritesAttribute(attribute = "invokegrpc.java.exception.class", description = "The Java exception class raised when the processor fails"),
|
||||
@WritesAttribute(attribute = "invokegrpc.java.exception.message", description = "The Java exception message raised when the processor fails"),
|
||||
})
|
||||
@DeprecationNotice(reason = "No planned alternatives to be offered. Use custom processors instead.")
|
||||
public class InvokeGRPC extends AbstractProcessor {
|
||||
public static final String RESPONSE_CODE = "invokegrpc.response.code";
|
||||
public static final String RESPONSE_BODY = "invokegrpc.response.body";
|
||||
|
@ -45,6 +45,7 @@ import org.apache.nifi.processors.grpc.ssl.SslContextProvider;
|
||||
import org.apache.nifi.processors.grpc.util.BackpressureChecker;
|
||||
import org.apache.nifi.ssl.RestrictedSSLContextService;
|
||||
import org.apache.nifi.ssl.SSLContextService;
|
||||
import org.apache.nifi.annotation.documentation.DeprecationNotice;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -65,6 +66,7 @@ import java.util.regex.Pattern;
|
||||
@WritesAttribute(attribute = GRPCAttributeNames.REMOTE_USER_DN, description = "The DN of the user who sent the FlowFile to this NiFi"),
|
||||
@WritesAttribute(attribute = GRPCAttributeNames.REMOTE_HOST, description = "The IP of the client who sent the FlowFile to this NiFi")
|
||||
})
|
||||
@DeprecationNotice(reason = "No planned alternatives to be offered. Use custom processors instead.")
|
||||
public class ListenGRPC extends AbstractSessionFactoryProcessor {
|
||||
|
||||
// properties
|
||||
|
@ -175,7 +175,7 @@ public class TestExecuteStreamCommand {
|
||||
List<MockFlowFile> flowFiles = controller.getFlowFilesForRelationship(ExecuteStreamCommand.NONZERO_STATUS_RELATIONSHIP);
|
||||
MockFlowFile flowFile = flowFiles.get(0);
|
||||
assertEquals(0, flowFile.getSize());
|
||||
assertEquals("Error: Unable to access jarfile", flowFile.getAttribute("execution.error").substring(0, 31));
|
||||
assertTrue(flowFile.getAttribute("execution.error").contains("Error: Unable to access jarfile"));
|
||||
assertTrue(flowFile.isPenalized());
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ public class TestExecuteStreamCommand {
|
||||
List<MockFlowFile> flowFiles = controller.getFlowFilesForRelationship(ExecuteStreamCommand.NONZERO_STATUS_RELATIONSHIP);
|
||||
MockFlowFile flowFile = flowFiles.get(0);
|
||||
assertEquals(0, flowFile.getSize());
|
||||
assertEquals("Error: Unable to access jarfile", flowFile.getAttribute("execution.error").substring(0, 31));
|
||||
assertTrue(flowFile.getAttribute("execution.error").contains("Error: Unable to access jarfile"));
|
||||
assertTrue(flowFile.isPenalized());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user