justinleet commented on a change in pull request #1554: METRON-2307: Migrate to 
JUnit5
URL: https://github.com/apache/metron/pull/1554#discussion_r346618893
 
 

 ##########
 File path: 
metron-analytics/metron-profiler-client/src/test/java/org/apache/metron/profiler/client/stellar/GetProfileTest.java
 ##########
 @@ -284,7 +275,7 @@ public void testMissingContext() {
 
     // validate - function should be unable to initialize
     String expr = "PROFILE_GET('profile1', 'entity1', PROFILE_FIXED(1000, 
'SECONDS'), groups)";
-    run(expr, List.class);
+    assertThrows(ParseException.class, () -> run(expr, List.class));
 
 Review comment:
   You'll see it, but `assertThrows` actually just returns the exception 
itself. You can then do whatever asserts you need to on the actual 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to