File tree Expand file tree Collapse file tree
test/src/main/java/org/apache/accumulo/test/functional Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import static org .junit .jupiter .api .Assertions .assertEquals ;
2323import static org .junit .jupiter .api .Assertions .assertFalse ;
2424import static org .junit .jupiter .api .Assertions .assertNotNull ;
25- import static org .junit .jupiter .api .Assertions .assertThrows ;
2625import static org .junit .jupiter .api .Assertions .assertTrue ;
2726import static org .junit .jupiter .api .Assumptions .assumeTrue ;
2827
3433import java .util .Map ;
3534import java .util .Map .Entry ;
3635import java .util .Set ;
37- import java .util .stream .Collectors ;
3836
3937import org .apache .accumulo .cluster .ClusterUser ;
4038import org .apache .accumulo .core .client .Accumulo ;
@@ -770,10 +768,12 @@ public void rootUserTablePermissionTest() throws Exception {
770768 }
771769 }
772770
773- Scanner scanner = c .createScanner (tableName , Authorizations .EMPTY );
774771 // Attempt to scan table as root user
775- assertThrows (RuntimeException .class , () -> scanner .stream ().collect (Collectors .toList ()),
776- "Error PERMISSION_DENIED" );
772+ try (Scanner scanner = c .createScanner (tableName , Authorizations .EMPTY )) {
773+ for (Entry <Key ,Value > keyValueEntry : scanner ) {
774+ assertNotNull (keyValueEntry );
775+ }
776+ }
777777 }
778778 }
779779 }
You can’t perform that action at this time.
0 commit comments