[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user asfgit closed the pull request at: https://github.com/apache/nifi-registry/pull/117 ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi-registry/pull/117#discussion_r188357732 --- Diff: pom.xml --- @@ -110,8 +110,8 @@ 2.1 2.26 2.9.2 -2.0.0.M7 -5.0.0.RELEASE +2.0.2.RELEASE --- End diff -- It seems we are also specifying the versions in the notice files. Should be updated as well. ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi-registry/pull/117#discussion_r188356239 --- Diff: nifi-registry-framework/src/test/java/org/apache/nifi/registry/provider/hook/TestScriptEventHookProvider.java --- @@ -0,0 +1,45 @@ +/* + * 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.registry.provider.hook; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + +import org.apache.nifi.registry.extension.ExtensionManager; +import org.apache.nifi.registry.properties.NiFiRegistryProperties; +import org.apache.nifi.registry.provider.ProviderCreationException; +import org.apache.nifi.registry.provider.ProviderFactory; +import org.apache.nifi.registry.provider.StandardProviderFactory; +import org.junit.Test; +import org.mockito.Mockito; + +public class TestScriptEventHookProvider { + +@Test(expected = ProviderCreationException.class) +public void testBadScriptProvider() { --- End diff -- can't test on my side but is it going to work for a build on Windows? ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi-registry/pull/117#discussion_r188356638 --- Diff: nifi-registry-framework/src/test/java/org/apache/nifi/registry/service/TestRegistryService.java --- @@ -81,6 +81,7 @@ public void setup() { metadataService = mock(MetadataService.class); flowPersistenceProvider = mock(FlowPersistenceProvider.class); +// eventHookProvider = mock(EventHookProvider.class); --- End diff -- To be removed? ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi-registry/pull/117#discussion_r188350335 --- Diff: nifi-registry-framework/src/main/java/org/apache/nifi/registry/provider/flow/StandardFlowSnapshotContext.java --- @@ -33,8 +33,8 @@ private final String flowName; private final int version; private final String comments; -private final long snapshotTimestamp; --- End diff -- Really nitpick but I think the changes on this class seem unnecessary, no? ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi-registry/pull/117#discussion_r188356509 --- Diff: nifi-registry-framework/src/test/java/org/apache/nifi/registry/provider/hook/TestScriptEventHookProvider.java --- @@ -0,0 +1,45 @@ +/* + * 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.registry.provider.hook; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + +import org.apache.nifi.registry.extension.ExtensionManager; +import org.apache.nifi.registry.properties.NiFiRegistryProperties; +import org.apache.nifi.registry.provider.ProviderCreationException; +import org.apache.nifi.registry.provider.ProviderFactory; +import org.apache.nifi.registry.provider.StandardProviderFactory; +import org.junit.Test; +import org.mockito.Mockito; + +public class TestScriptEventHookProvider { + +@Test(expected = ProviderCreationException.class) +public void testBadScriptProvider() { --- End diff -- ok nevermind, since we expect it to fail, it should also fail on Windows ---
[GitHub] nifi-registry pull request #117: NIFIREG-160 Implement a hook provider
GitHub user bbende opened a pull request: https://github.com/apache/nifi-registry/pull/117 NIFIREG-160 Implement a hook provider For whoever reviews/merges this, please keep the commit history and don't squash. You can merge this pull request into a Git repository by running: $ git pull https://github.com/bbende/nifi-registry hook-provider Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi-registry/pull/117.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #117 commit 3371a07068dbbd5b3984f386cf61bc297ba608a9 Author: Pierre VillardDate: 2018-04-06T14:58:33Z NIFIREG-160 - Initial hook provider commit f99cf19d49bf5d301ada83a5c128b645da00458f Author: Bryan Bende Date: 2018-05-08T17:38:33Z NIFIREG-160 - Making event hooks asynchronous ---