Skip to content

Commit

Permalink
extend timeout for queries in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
divarvel committed Dec 8, 2023
1 parent 0a251a4 commit 11459ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js-tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ test("complete lifecycle", function(t) {

let otherKeyPair = new KeyPair();
let r = rule`u($id) <- user($id), $id == ${id} trusting authority, ${otherKeyPair.getPublicKey()}`;
let facts = auth.query(r);
let facts = auth.query(r, {
max_time_micro: 10000
});
t.equal(facts.length, 1, "correct number of query results");
t.equal(facts[0].toString(), `u("1234")`, "correct query result");
t.end();
Expand Down Expand Up @@ -245,7 +247,9 @@ test("third-party blocks", function(t) {
t.equal(policy, 0, "authorization suceeded");

let r1 = rule`g($group) <- group($group) trusting ${thirdPartyRoot.getPublicKey()}`;
let facts = auth.query(r1);
let facts = auth.query_with_limits(r1, {
max_time_micro: 10000
});
t.equal(facts.length, 1, "correct number of query results");
t.equal(facts[0].toString(), `g("admin")`, "correct query result");

Expand Down

0 comments on commit 11459ce

Please sign in to comment.