exceptionfactory commented on code in PR #7940:
URL: https://github.com/apache/nifi/pull/7940#discussion_r1538546543


##########
nifi-mock/src/main/java/org/apache/nifi/util/RelationshipMigrationResult.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.util;
+
+import java.util.Map;
+import java.util.Set;
+
+public interface RelationshipMigrationResult {
+
+    /**
+     * @return a mapping of previous relationship names to the new names of 
those relationships
+     */
+    Map<String, Set<String>> getRelationshipsSplit();
+
+    /**
+     * @return a mapping of previous relationship names to the new names of 
those relationships
+     */
+    Map<String, String> getRelationshipsRenamed();

Review Comment:
   Aligning with the other method, perhaps `getRenamedRelationships()`?



##########
nifi-mock/src/main/java/org/apache/nifi/util/RelationshipMigrationResult.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.util;
+
+import java.util.Map;
+import java.util.Set;
+
+public interface RelationshipMigrationResult {
+
+    /**
+     * @return a mapping of previous relationship names to the new names of 
those relationships
+     */
+    Map<String, Set<String>> getRelationshipsSplit();

Review Comment:
   The `Split` naming is not quite clear. Perhaps `getPreviousRelationships()`?



##########
nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java:
##########
@@ -229,33 +226,32 @@ public void run(final int iterations, final boolean 
stopOnFinish, final boolean
                 executorService.awaitTermination(runWait, 
TimeUnit.MILLISECONDS);
             } catch (final InterruptedException e1) {
             }
+        }
 
-            int finishedCount = 0;
-            boolean unscheduledRun = false;
-            for (final Future<Throwable> future : futures) {
-                try {
-                    final Throwable thrown = future.get(); // wait for the 
result
-                    if (thrown != null) {
-                        throw new AssertionError(thrown);
-                    }
+        int finishedCount = 0;
+        boolean unscheduledRun = false;
+        for (final Future<Throwable> future : futures) {
+            try {
+                final Throwable thrown = future.get(); // wait for the result
+                if (thrown != null) {
+                    throw new AssertionError(thrown);
+                }
 
-                    if (++finishedCount == 1 && stopOnFinish) {
-                        unscheduledRun = true;
-                        unSchedule();
-                    }
-                } catch (final Exception e) {
+                if (++finishedCount == 1 && stopOnFinish) {
+                    unscheduledRun = true;
+                    unSchedule();
                 }
+            } catch (final Exception e) {
+                e.printStackTrace();

Review Comment:
   This use of `printStackTrace()` seems problematic, better throw a more 
particular type of exception?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to