Skip to content

Commit

Permalink
chore: try adding await to check if storage is full to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Nov 8, 2023
1 parent bf40a95 commit 8aec67d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ void main() {
await db.addItem('0', DateTime.now().toIso8601String());
}

var result = db.isFull(capacityLimit);
var result = await db.isFull(capacityLimit);
expect(result, isFalse);

// add enough items to exceed capacity limit of 1mb
for (var i = 0; i < 50000; i++) {
await db.addItem('0', DateTime.now().toIso8601String());
}

result = db.isFull(capacityLimit);
result = await db.isFull(capacityLimit);
expect(result, isTrue);
},
);
Expand Down

0 comments on commit 8aec67d

Please sign in to comment.