Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alopresto/184f3631ec44a4c036d323d622ea97aa to your computer and use it in GitHub Desktop.
Save alopresto/184f3631ec44a4c036d323d622ea97aa to your computer and use it in GitHub Desktop.
Bash commands demonstrating the Groovy tests being skipped in Apache NiFi PR 2919.
~W/nifi (master) πŸ˜‰
πŸ”’ 0s @ 19:50:01 $ git --no-pager log -n 1 --show-signature
commit a19134f32560ae044cb898a7654ada31338e20c2 (HEAD -> master, upstream/master, origin/master, origin/HEAD, apache/master, 2919)
Author: Lars Francke <[email protected]>
Date: Thu Jun 28 23:22:49 2018 +0200
NIFI-5350 Add a way to provide arbitrary Java options in shell scripts
Signed-off-by: Mike Moser <[email protected]>
This closes #2823
~W/nifi (master) πŸ˜‰
πŸ”’ 3s @ 19:50:08 $ git cherry-pick f33f32b66b8fb6b673c471fb1e0e54ef347c3f8a
[master ee0cca3813] NIFI-5400 - Changed the hostname verifier from the custom NiFi verifier to the Apache http-client DefaultHostnameVerifier Removed NiFiHostnameVerifier. Removed NiFi WebUtils usage of NiFiHostnameVerifier. Added unit tests for the DefaultHostnameVerifier to WebUtils.java
Author: thenatog <[email protected]>
Date: Thu Jul 26 16:33:52 2018 -0400
6 files changed, 278 insertions(+), 127 deletions(-)
delete mode 100644 nifi-commons/nifi-web-utils/src/main/java/org/apache/nifi/web/util/NiFiHostnameVerifier.java
~W/nifi (master) πŸ˜‰
πŸ”’ 1s @ 19:50:33 $ cd nifi-commons/nifi-web-utils/
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:50:41 $ mvn clean test
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] -------------------< org.apache.nifi:nifi-web-utils >-------------------
[INFO] Building nifi-web-utils 1.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-web-utils ---
[INFO] Deleting /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ nifi-web-utils ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-web-utils ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ nifi-web-utils ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ nifi-web-utils ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ nifi-web-utils ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ nifi-web-utils ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/src/test/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ nifi-web-utils ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-tests) @ nifi-web-utils ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ nifi-web-utils ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.892 s
[INFO] Finished at: 2018-08-06T19:50:54-07:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "avoid-archive-formats" could not be activated because it does not exist.
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 6s @ 19:50:54 $ tree -alshCF --prune
.
β”œβ”€β”€ [3.8K] nifi-web-utils.iml
β”œβ”€β”€ [4.0K] pom.xml
β”œβ”€β”€ [ 136] src/
β”‚Β Β  β”œβ”€β”€ [ 102] main/
β”‚Β Β  β”‚Β Β  └── [ 102] java/
β”‚Β Β  β”‚Β Β  └── [ 102] org/
β”‚Β Β  β”‚Β Β  └── [ 102] apache/
β”‚Β Β  β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  β”‚Β Β  └── [ 136] web/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [ 102] filter/
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── [3.3K] SanitizeContextPathFilter.java
β”‚Β Β  β”‚Β Β  └── [ 170] util/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [3.8K] ClientUtils.java
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [1.6K] ObjectMapperResolver.java
β”‚Β Β  β”‚Β Β  └── [9.9K] WebUtils.java
β”‚Β Β  └── [ 102] test/
β”‚Β Β  └── [ 102] groovy/
β”‚Β Β  └── [ 102] org/
β”‚Β Β  └── [ 102] apache/
β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  └── [ 102] web/
β”‚Β Β  └── [ 102] util/
β”‚Β Β  └── [ 18K] WebUtilsTest.groovy
└── [ 272] target/
β”œβ”€β”€ [ 30] .plxarc
β”œβ”€β”€ [ 136] classes/
β”‚Β Β  β”œβ”€β”€ [ 170] META-INF/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [6.0K] DEPENDENCIES
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [ 11K] LICENSE
β”‚Β Β  β”‚Β Β  └── [ 155] NOTICE
β”‚Β Β  └── [ 102] org/
β”‚Β Β  └── [ 102] apache/
β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  └── [ 136] web/
β”‚Β Β  β”œβ”€β”€ [ 102] filter/
β”‚Β Β  β”‚Β Β  └── [2.7K] SanitizeContextPathFilter.class
β”‚Β Β  └── [ 170] util/
β”‚Β Β  β”œβ”€β”€ [3.4K] ClientUtils.class
β”‚Β Β  β”œβ”€β”€ [2.2K] ObjectMapperResolver.class
β”‚Β Β  └── [5.7K] WebUtils.class
β”œβ”€β”€ [ 102] maven-shared-archive-resources/
β”‚Β Β  └── [ 170] META-INF/
β”‚Β Β  β”œβ”€β”€ [6.0K] DEPENDENCIES
β”‚Β Β  β”œβ”€β”€ [ 11K] LICENSE
β”‚Β Β  └── [ 155] NOTICE
β”œβ”€β”€ [ 102] maven-status/
β”‚Β Β  └── [ 102] maven-compiler-plugin/
β”‚Β Β  └── [ 102] compile/
β”‚Β Β  └── [ 136] default-compile/
β”‚Β Β  β”œβ”€β”€ [ 194] createdFiles.lst
β”‚Β Β  └── [ 486] inputFiles.lst
└── [ 102] test-classes/
└── [ 170] META-INF/
β”œβ”€β”€ [6.0K] DEPENDENCIES
β”œβ”€β”€ [ 11K] LICENSE
└── [ 155] NOTICE
33 directories, 23 files
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:51:26 $ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: pom.xml
no changes added to commit (use "git add" and/or "git commit -a")
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:52:07 $ git add -u
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:52:14 $ git diff --cached
diff --git a/nifi-commons/nifi-web-utils/pom.xml b/nifi-commons/nifi-web-utils/pom.xml
index 5af8e056a4..2830e58ab0 100644
--- a/nifi-commons/nifi-web-utils/pom.xml
+++ b/nifi-commons/nifi-web-utils/pom.xml
@@ -91,5 +91,53 @@
<version>4.5.6</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.6</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <!-- Only run for tests -->
+ <execution>
+ <id>groovy-tests</id>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ <configuration>
+ <compilerId>groovy-eclipse-compiler</compilerId>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-eclipse-compiler</artifactId>
+ <version>2.9.2-01</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-eclipse-batch</artifactId>
+ <version>2.4.3-01</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-eclipse-compiler</artifactId>
+ <version>2.9.2-01</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
</project>
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:52:15 $ mvn clean test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.nifi:nifi-web-utils:jar:1.8.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.httpcomponents:httpclient:jar -> duplicate declaration of version 4.5.6 @ org.apache.nifi:nifi-web-utils:[unknown-version], /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/pom.xml, line 94, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] -------------------< org.apache.nifi:nifi-web-utils >-------------------
[INFO] Building nifi-web-utils 1.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ nifi-web-utils ---
[INFO] Deleting /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ nifi-web-utils ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ nifi-web-utils ---
[INFO]
[INFO] --- groovy-eclipse-compiler:2.9.2-01:add-groovy-build-paths (default-add-groovy-build-paths) @ nifi-web-utils ---
[INFO] Adding /src/main/groovy to the list of source folders
[INFO] Adding /src/test/groovy to the list of test source folders
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ nifi-web-utils ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ nifi-web-utils ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ nifi-web-utils ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ nifi-web-utils ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alopresto/Workspace/nifi/nifi-commons/nifi-web-utils/src/test/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ nifi-web-utils ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (groovy-tests) @ nifi-web-utils ---
[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] Found location </Users/alopresto/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar> for className <org.eclipse.jdt.internal.compiler.batch.Main>
[INFO] no javaAgentClass seems to be set
[INFO] Compiling in a forked process using /Users/alopresto/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.4.3-01/groovy-eclipse-batch-2.4.3-01.jar
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ nifi-web-utils ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.nifi.web.util.WebUtilsTest
[INFO] Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.02 s - in org.apache.nifi.web.util.WebUtilsTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 19, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.027 s
[INFO] Finished at: 2018-08-06T19:52:38-07:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "avoid-archive-formats" could not be activated because it does not exist.
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 18s @ 19:52:38 $ tree -alshCF --prune
.
β”œβ”€β”€ [3.8K] nifi-web-utils.iml
β”œβ”€β”€ [5.8K] pom.xml
β”œβ”€β”€ [ 136] src/
β”‚Β Β  β”œβ”€β”€ [ 102] main/
β”‚Β Β  β”‚Β Β  └── [ 102] java/
β”‚Β Β  β”‚Β Β  └── [ 102] org/
β”‚Β Β  β”‚Β Β  └── [ 102] apache/
β”‚Β Β  β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  β”‚Β Β  └── [ 136] web/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [ 102] filter/
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── [3.3K] SanitizeContextPathFilter.java
β”‚Β Β  β”‚Β Β  └── [ 170] util/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [3.8K] ClientUtils.java
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [1.6K] ObjectMapperResolver.java
β”‚Β Β  β”‚Β Β  └── [9.9K] WebUtils.java
β”‚Β Β  └── [ 102] test/
β”‚Β Β  └── [ 102] groovy/
β”‚Β Β  └── [ 102] org/
β”‚Β Β  └── [ 102] apache/
β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  └── [ 102] web/
β”‚Β Β  └── [ 102] util/
β”‚Β Β  └── [ 18K] WebUtilsTest.groovy
└── [ 306] target/
β”œβ”€β”€ [ 30] .plxarc
β”œβ”€β”€ [ 136] classes/
β”‚Β Β  β”œβ”€β”€ [ 170] META-INF/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [6.0K] DEPENDENCIES
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [ 11K] LICENSE
β”‚Β Β  β”‚Β Β  └── [ 155] NOTICE
β”‚Β Β  └── [ 102] org/
β”‚Β Β  └── [ 102] apache/
β”‚Β Β  └── [ 102] nifi/
β”‚Β Β  └── [ 136] web/
β”‚Β Β  β”œβ”€β”€ [ 102] filter/
β”‚Β Β  β”‚Β Β  └── [2.7K] SanitizeContextPathFilter.class
β”‚Β Β  └── [ 170] util/
β”‚Β Β  β”œβ”€β”€ [3.4K] ClientUtils.class
β”‚Β Β  β”œβ”€β”€ [2.2K] ObjectMapperResolver.class
β”‚Β Β  └── [5.7K] WebUtils.class
β”œβ”€β”€ [ 102] maven-shared-archive-resources/
β”‚Β Β  └── [ 170] META-INF/
β”‚Β Β  β”œβ”€β”€ [6.0K] DEPENDENCIES
β”‚Β Β  β”œβ”€β”€ [ 11K] LICENSE
β”‚Β Β  └── [ 155] NOTICE
β”œβ”€β”€ [ 102] maven-status/
β”‚Β Β  └── [ 136] maven-compiler-plugin/
β”‚Β Β  β”œβ”€β”€ [ 102] compile/
β”‚Β Β  β”‚Β Β  └── [ 136] default-compile/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [ 194] createdFiles.lst
β”‚Β Β  β”‚Β Β  └── [ 486] inputFiles.lst
β”‚Β Β  └── [ 136] testCompile/
β”‚Β Β  β”œβ”€β”€ [ 102] default-testCompile/
β”‚Β Β  β”‚Β Β  └── [ 0] inputFiles.lst
β”‚Β Β  └── [ 136] groovy-tests/
β”‚Β Β  β”œβ”€β”€ [1.6K] createdFiles.lst
β”‚Β Β  └── [ 121] inputFiles.lst
β”œβ”€β”€ [ 170] surefire-reports/
β”‚Β Β  β”œβ”€β”€ [ 15K] TEST-org.apache.nifi.web.util.WebUtilsTest.xml
β”‚Β Β  β”œβ”€β”€ [ 11K] org.apache.nifi.web.util.WebUtilsTest-output.txt
β”‚Β Β  └── [ 323] org.apache.nifi.web.util.WebUtilsTest.txt
└── [ 136] test-classes/
β”œβ”€β”€ [ 170] META-INF/
β”‚Β Β  β”œβ”€β”€ [6.0K] DEPENDENCIES
β”‚Β Β  β”œβ”€β”€ [ 11K] LICENSE
β”‚Β Β  └── [ 155] NOTICE
└── [ 102] org/
└── [ 102] apache/
└── [ 102] nifi/
└── [ 102] web/
└── [ 612] util/
β”œβ”€β”€ [2.4K] WebUtilsTest$_mockRequest_closure2.class
β”œβ”€β”€ [3.5K] WebUtilsTest$_mockRequest_closure3.class
β”œβ”€β”€ [2.9K] WebUtilsTest$_setUpOnce_closure1.class
β”œβ”€β”€ [2.9K] WebUtilsTest$_testGetResourcePathShouldAllowContextPathHeaderIfElementInMultipleWhitelist_closure10$_closure14.class
β”œβ”€β”€ [4.9K] WebUtilsTest$_testGetResourcePathShouldAllowContextPathHeaderIfElementInMultipleWhitelist_closure10.class
β”œβ”€β”€ [2.4K] WebUtilsTest$_testGetResourcePathShouldAllowContextPathHeaderIfElementInMultipleWhitelist_closure9.class
β”œβ”€β”€ [4.1K] WebUtilsTest$_testGetResourcePathShouldAllowContextPathHeaderIfInWhitelist_closure8.class
β”œβ”€β”€ [3.7K] WebUtilsTest$_testGetResourcePathShouldBlockContextPathHeaderIfNotInWhitelist_closure7$_closure13.class
β”œβ”€β”€ [4.1K] WebUtilsTest$_testGetResourcePathShouldBlockContextPathHeaderIfNotInWhitelist_closure7.class
β”œβ”€β”€ [4.0K] WebUtilsTest$_testShouldDetermineCorrectContextPathWhenAbsent_closure5.class
β”œβ”€β”€ [4.0K] WebUtilsTest$_testShouldDetermineCorrectContextPathWhenPresent_closure4.class
β”œβ”€β”€ [4.1K] WebUtilsTest$_testShouldNormalizeContextPath_closure6.class
β”œβ”€β”€ [3.3K] WebUtilsTest$_testVerifyContextPathShouldAllowContextPathHeaderIfBlank_closure11.class
β”œβ”€β”€ [3.3K] WebUtilsTest$_testVerifyContextPathShouldBlockContextPathHeaderIfNotAllowed_closure12$_closure15.class
β”œβ”€β”€ [4.3K] WebUtilsTest$_testVerifyContextPathShouldBlockContextPathHeaderIfNotAllowed_closure12.class
└── [ 19K] WebUtilsTest.class
42 directories, 45 files
...rkspace/nifi/nifi-commons/nifi-web-utils (master) πŸ˜‰
πŸ”’ 0s @ 19:52:41 $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment