File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,10 @@ void main() {
180
180
181
181
expect (db.select ('select 1 from ps_sync_state where priority = ?' , [i]),
182
182
isNotEmpty);
183
+ // A sync at this priority includes all higher priorities too, so they
184
+ // should be cleared.
185
+ expect (db.select ('select 1 from ps_sync_state where priority < ?' , [i]),
186
+ isEmpty);
183
187
}
184
188
});
185
189
@@ -192,10 +196,13 @@ void main() {
192
196
isTrue);
193
197
expect (db.select ('SELECT powersync_last_synced_at() AS r' ).single,
194
198
{'r' : isNotNull});
199
+ expect (db.select ('SELECT priority FROM ps_sync_state' ).single,
200
+ {'priority' : 2147483647 });
195
201
196
202
db.execute ('SELECT powersync_clear(0)' );
197
203
expect (db.select ('SELECT powersync_last_synced_at() AS r' ).single,
198
204
{'r' : isNull});
205
+ expect (db.select ('SELECT * FROM ps_sync_state' ), hasLength (0 ));
199
206
});
200
207
});
201
208
}
You can’t perform that action at this time.
0 commit comments