Skip to content

Commit ffd5bf2

Browse files
committed
And another one
1 parent 82007dc commit ffd5bf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/powersync_core/test/watch_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void main() {
113113
const throttleDuration = Duration(milliseconds: baseTime);
114114

115115
var done = false;
116-
inserts() async {
116+
Future<void> inserts() async {
117117
while (!done) {
118118
await powersync.execute(
119119
'INSERT INTO assets(id, make) VALUES (uuid(), ?)', ['test']);
@@ -122,7 +122,7 @@ void main() {
122122
}
123123
}
124124

125-
inserts();
125+
final insertsFuture = inserts();
126126

127127
final stream = powersync.onChange({'assets', 'customers'},
128128
throttle: throttleDuration).asyncMap((event) async {
@@ -140,6 +140,7 @@ void main() {
140140
UpdateNotification.single('assets'),
141141
UpdateNotification.single('assets')
142142
]));
143+
await insertsFuture;
143144
});
144145

145146
test('emits update events with friendly names', () async {

0 commit comments

Comments
 (0)