This is an automated email from the ASF dual-hosted git repository. chriss pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push: new 81d387cad5 NIFI-13139 ensure nifi-py4j-nar is included in test assembly Ensure nifi-py4j integration tests have proper logback libs 81d387cad5 is described below commit 81d387cad561b34c50e46aeedc703444fb2dee23 Author: Joseph Witt <joew...@apache.org> AuthorDate: Sat May 4 19:26:47 2024 -0700 NIFI-13139 ensure nifi-py4j-nar is included in test assembly Ensure nifi-py4j integration tests have proper logback libs This closes #8747 Signed-off-by: Joseph Witt <joew...@apache.org> Signed-off-by: Chris Sampson <chris.sampso...@gmail.com> --- .../nifi-py4j-integration-tests/pom.xml | 10 +++++++ .../PythonControllerInteractionIT.java | 3 +- .../src/test/resources/logback-test.xml | 32 ++++++++++++++++++++++ .../src/test/assembly/dependencies.xml | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/pom.xml b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/pom.xml index 2df4f3ff58..3901eea4ca 100644 --- a/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/pom.xml +++ b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/pom.xml @@ -50,6 +50,16 @@ <version>2.0.0-SNAPSHOT</version> <scope>test</scope> </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-framework-api</artifactId> diff --git a/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/java/org.apache.nifi.py4j/PythonControllerInteractionIT.java b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/java/org.apache.nifi.py4j/PythonControllerInteractionIT.java index 8c184f22a5..0109036456 100644 --- a/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/java/org.apache.nifi.py4j/PythonControllerInteractionIT.java +++ b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/java/org.apache.nifi.py4j/PythonControllerInteractionIT.java @@ -140,8 +140,6 @@ public class PythonControllerInteractionIT { @Test public void testGetProcessorDetails() { - System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi.py4j", "DEBUG"); - bridge.discoverExtensions(true); final List<PythonProcessorDetails> extensionDetails = bridge.getProcessorTypes(); @@ -284,6 +282,7 @@ public class PythonControllerInteractionIT { } @Test + @Disabled("requires specific local env config...") public void testImportRequirements() { // Discover extensions so that they can be created bridge.discoverExtensions(true); diff --git a/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/resources/logback-test.xml b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..3da569d902 --- /dev/null +++ b/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-integration-tests/src/test/resources/logback-test.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> + +<configuration scan="true" scanPeriod="30 seconds"> + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <pattern>%-4r [%t] %-5p %c - %m%n</pattern> + </encoder> + </appender> + + <!-- valid logging levels: TRACE, DEBUG, INFO, WARN, ERROR --> + <logger name="org.apache.nifi" level="INFO"/> + <logger name="org.slf4j.simpleLogger.log.org.apache.nifi.py4j" level="INFO"/> + <root level="INFO"> + <appender-ref ref="CONSOLE"/> + </root> + +</configuration> + diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml b/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml index fb780b4edf..42c4e5e875 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml +++ b/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml @@ -76,6 +76,7 @@ <include>*:nifi-standard-services-api-nar</include> <include>*:nifi-provenance-repository-nar</include> <include>*:nifi-standard-shared-nar</include> + <include>*:nifi-py4j-nar</include> </includes> </dependencySet>