lordgamez commented on a change in pull request #891:
URL: https://github.com/apache/nifi-minifi-cpp/pull/891#discussion_r482990129



##########
File path: extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp
##########
@@ -335,21 +335,26 @@ TEST_CASE("ConsumeWindowsEventLog prints events in XML 
correctly", "[onTrigger]"
     test_controller.runSession(test_plan);
 
     REQUIRE(LogTestController::getInstance().contains(R"(<Event 
xmlns="http://schemas.microsoft.com/win/2004/08/events/event";><System><Provider 
Name="Application"/>)"));
-    REQUIRE(LogTestController::getInstance().contains(R"(<EventID 
Qualifiers="0">14985</EventID><Level>4</Level><Task>0</Task><Keywords>0x80000000000000</Keywords><TimeCreated
 SystemTime=")"));
+    REQUIRE(LogTestController::getInstance().contains(R"(<EventID 
Qualifiers="0">14985</EventID>)"));
+    REQUIRE(LogTestController::getInstance().contains(R"(<Level>4</Level>)"));
+    REQUIRE(LogTestController::getInstance().contains(R"(<Task>0</Task>)"));
+    
REQUIRE(LogTestController::getInstance().contains(R"(<Keywords>0x80000000000000</Keywords><TimeCreated
 SystemTime=")"));
     // the timestamp (when the event was published) goes here
     
REQUIRE(LogTestController::getInstance().contains(R"("/><EventRecordID>)"));
     // the ID of the event goes here (a number)
-    
REQUIRE(LogTestController::getInstance().contains(R"(</EventRecordID><Channel>Application</Channel><Computer>)"));
+    REQUIRE(LogTestController::getInstance().contains(R"(</EventRecordID>)"));
+    
REQUIRE(LogTestController::getInstance().contains(R"(<Channel>Application</Channel><Computer>)"));

Review comment:
       The reason I weakened the condition is because the test was failing on 
my system, as the output of the event was something like 
[this](https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/5383445d-437e-4ad5-bf03-9584aef9527a/httpschemasmicrosoftcomwin200408eventseventquotgt?forum=windowsdesktopsearchhelp).
 There are a couple of additional tags in between, like the Correlation and 
Execution tag after the EventRecordID, which seem to be valid according to the 
schema. I am not sure what causes the difference.




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

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


Reply via email to