DomGarguilo commented on a change in pull request #2472:
URL: https://github.com/apache/accumulo/pull/2472#discussion_r804042251



##########
File path: 
core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
##########
@@ -59,25 +60,6 @@ public void testVisibilityEvaluator() throws 
VisibilityParseException {
     for (String marking : new String[] {"five", "one&five", "five&one", 
"((one|foo)|bar)&goober"}) {
       assertFalse(marking, ct.evaluate(new ColumnVisibility(marking)));
     }
-
-    // test missing separators; these should throw an exception
-    for (String marking : new String[] {"one(five)", "(five)one", 
"(one)(two)", "a|(b(c))"}) {
-      assertThrows(marking + " failed to throw", BadArgumentException.class,
-          () -> ct.evaluate(new ColumnVisibility(marking)));
-    }
-
-    // test unexpected separator
-    for (String marking : new String[] {"&(five)", "|(five)", "(five)&", 
"five|", "a|(b)&",
-        "(&five)", "(five|)"}) {
-      assertThrows(marking + " failed to throw", BadArgumentException.class,
-          () -> ct.evaluate(new ColumnVisibility(marking)));
-    }
-
-    // test mismatched parentheses
-    for (String marking : new String[] {"(", ")", "(a&b", "b|a)"}) {
-      assertThrows(marking + " failed to throw", BadArgumentException.class,
-          () -> ct.evaluate(new ColumnVisibility(marking)));
-    }

Review comment:
       I intentionally removed them because they are not actually testing 
`VisibilityEvaluator` functionality. I left a note 
[here](https://github.com/apache/accumulo/pull/2472#issuecomment-1035044296), 
but these tests were failing on the creation of `new ColumnVisibility(marking)` 
which is already tested in ColumnVisibilityTest. Here are the three spots in 
ColumnVisibilityTest that cover these cases.
   
https://github.com/apache/accumulo/blob/1dc72fce2c781dee597c8c11876a3bc6c321c199/core/src/test/java/org/apache/accumulo/core/security/ColumnVisibilityTest.java#L125-L136




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