Skip to content

Commit

Permalink
Wait for g.e queue to be empty after every tick
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Feb 25, 2024
1 parent 5f1c2b2 commit ec24a1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/grandExchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ describe('Grand Exchange', async () => {

async function waitForGEToBeEmpty() {
await GrandExchange.queue.onEmpty();
assert(GrandExchange.queue.size === 0, 'G.E Queue should be empty');
assert(!GrandExchange.locked, 'G.E should not be locked');
}

Expand Down Expand Up @@ -116,6 +115,7 @@ describe('Grand Exchange', async () => {
// Tick the g.e to make some transactions
for (let i = 0; i < 100; i++) {
await GrandExchange.tick();
await waitForGEToBeEmpty();
await Promise.all([
GrandExchange.checkGECanFullFilAllListings(),
GrandExchange.extensiveVerification()
Expand Down

0 comments on commit ec24a1a

Please sign in to comment.