boguszj commented on code in PR #11748:
URL: https://github.com/apache/nifi/pull/11748#discussion_r4193996250


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestUpdateCounter.java:
##########
@@ -62,6 +63,26 @@ public void testExpressionLanguage() {
         runner.assertAllFlowFilesTransferred(UpdateCounter.SUCCESS, 1);
     }
 
+    @Test
+    public void testAttributes() {
+        runner.setProperty(UpdateCounter.COUNTER_NAME, "firewall");
+        runner.setProperty(UpdateCounter.DELTA, "${num}");
+        runner.setProperty("service", "payments");
+        runner.setProperty("region", "${region}");
+        runner.setProperty("emptyAttribute", "${missingAttribute}");
+
+        final Map<String, String> attributes = Map.of(
+                "num", "5",
+                "region", "us-west"
+        );
+        runner.enqueue(new byte[0], attributes);
+        runner.run();
+
+        assertEquals(5L, runner.getCounterValue("firewall", Map.of("service", 
"payments", "region", "us-west")));

Review Comment:
   Done, the same was true for previously existing tests, so updated all



-- 
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