File tree Expand file tree Collapse file tree
src/test/java/org/eclipse/biscuit/token Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212import biscuit .format .schema .Schema ;
1313import java .security .SecureRandom ;
14+ import java .time .Duration ;
1415import java .util .ArrayList ;
1516import java .util .Arrays ;
1617import java .util .List ;
1718import java .util .Set ;
1819import org .eclipse .biscuit .crypto .KeyPair ;
20+ import org .eclipse .biscuit .datalog .RunLimits ;
1921import org .eclipse .biscuit .error .Error ;
2022import org .eclipse .biscuit .error .Error .Parser ;
2123import org .eclipse .biscuit .token .builder .Expression ;
2224import org .eclipse .biscuit .token .builder .Term ;
2325import org .junit .jupiter .api .Test ;
2426
2527public class AuthorizerTest {
28+ final RunLimits runLimits = new RunLimits (500 , 100 , Duration .ofMillis (500 ));
2629
2730 @ Test
2831 public void testAuthorizerPolicy () throws Parser {
@@ -102,7 +105,7 @@ public void testDatalogAuthorizer() throws Exception {
102105 String datalog = String .join (";" , Arrays .asList (l0 , l1 , l2 ));
103106 authorizer .addDatalog (datalog );
104107
105- assertDoesNotThrow (() -> authorizer .authorize ());
108+ assertDoesNotThrow (() -> authorizer .authorize (runLimits ));
106109
107110 Term emailTerm = queryFirstResult (authorizer , "right($address) <- email($address)" );
108111 assertEquals ("bob@example.com" , ((Term .Str ) emailTerm ).getValue ());
You can’t perform that action at this time.
0 commit comments