This is an automated email from the ASF dual-hosted git repository.
aldrin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new df45d52 MINIFICPP-749: Update lexer defs to support dot in identifiers
df45d52 is described below
commit df45d52957e0ba5b0644bb7c21869c54c9e41846
Author: Marc Parisi <[email protected]>
AuthorDate: Fri Mar 1 10:59:40 2019 -0500
MINIFICPP-749: Update lexer defs to support dot in identifiers
This closes #493.
Signed-off-by: Aldrin Piri <[email protected]>
---
extensions/expression-language/Scanner.ll | 2 +-
.../integration/UpdateAttributeIntegrationTest.cpp | 6 ++++++
libminifi/test/resources/TestUpdateAttribute.yml | 1 +
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/extensions/expression-language/Scanner.ll
b/extensions/expression-language/Scanner.ll
index a23689d..df4c1d7 100644
--- a/extensions/expression-language/Scanner.ll
+++ b/extensions/expression-language/Scanner.ll
@@ -33,7 +33,7 @@
%option 8bit
%option c++
-id [a-zA-Z][a-zA-Z_0-9]*
+id [a-zA-Z][a-zA-Z_0-9.]*
num [-]?[0-9]+[.]?[0-9]*([eE][+-]?[0-9]+)?
whitespace [ \r\t]+
diff --git
a/libminifi/test/expression-language-tests/integration/UpdateAttributeIntegrationTest.cpp
b/libminifi/test/expression-language-tests/integration/UpdateAttributeIntegrationTest.cpp
index 6148c65..e635a2b 100644
---
a/libminifi/test/expression-language-tests/integration/UpdateAttributeIntegrationTest.cpp
+++
b/libminifi/test/expression-language-tests/integration/UpdateAttributeIntegrationTest.cpp
@@ -54,6 +54,12 @@ class TestHarness : public IntegrationBase {
void waitToVerifyProcessor() {
// This test takes a while to complete -> wait at most 10 secs
log_entry_found =
LogTestController::getInstance().contains("key:route_check_attr value:good",
std::chrono::seconds(10));
+ log_entry_found =
LogTestController::getInstance().contains("key:variable_attribute
value:replacement_value", std::chrono::seconds(10));
+ }
+
+ void queryRootProcessGroup(std::shared_ptr<core::ProcessGroup> pg) {
+ // inject the variable into the context.
+ configuration->set("nifi.variable.test", "replacement_value");
}
protected:
diff --git a/libminifi/test/resources/TestUpdateAttribute.yml
b/libminifi/test/resources/TestUpdateAttribute.yml
index c37f8fe..f22aed4 100644
--- a/libminifi/test/resources/TestUpdateAttribute.yml
+++ b/libminifi/test/resources/TestUpdateAttribute.yml
@@ -67,6 +67,7 @@ Processors:
auto-terminated relationships list: failure
Properties:
route_check_attr: good
+ variable_attribute: ${nifi.variable.test}
- name: la
id: 2438e3c8-015a-1000-79ca-83af40ec1995
class: org.apache.nifi.processors.standard.LogAttribute