Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Apr 17, 2024
1 parent 18236bd commit 02ba6f8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/src/plenty/households/household-to-requestors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ test('link a Household to a Requestor', async () => {
let linksOutput = await toPromise(bob.store.households.get(householdHash).requestors.live);
assert.equal(linksOutput.length, 0);

// Wait for the created entry to be propagated to the other node.
await dhtSync(
[alice.player, bob.player],
alice.player.cells[0].cell_id[0]
);

// Alice creates a link from Household to Requestor
await bob.store.client.requestToJoinHousehold(householdHash);

Expand Down Expand Up @@ -66,8 +72,14 @@ test('Request to join household and cancel it ', async () => {
let linksOutput = await toPromise(bob.store.households.get(baseAddress).requestors.live);
assert.equal(linksOutput.length, 0);

// Wait for the created entry to be propagated to the other node.
await dhtSync(
[alice.player, bob.player],
alice.player.cells[0].cell_id[0]
);

// Alice creates a link from Household to Requestor
const joinRequestHash = await bob.store.client.requestToJoinHousehold(baseAddress);
await bob.store.client.requestToJoinHousehold(baseAddress);

// Wait for the created entry to be propagated to the other node.
await dhtSync(
Expand Down

0 comments on commit 02ba6f8

Please sign in to comment.