@@ -55,7 +55,9 @@ export function registerSyncTests(factory: storage.TestStorageFactory) {
5555
5656 const bucketStorage = f . getInstance ( syncRules ) ;
5757
58- const result = await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
58+ await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
59+ await batch . markAllSnapshotDone ( '0/1' ) ;
60+
5961 await batch . save ( {
6062 sourceTable : TEST_TABLE ,
6163 tag : storage . SaveOperationTag . INSERT ,
@@ -119,7 +121,8 @@ bucket_definitions:
119121
120122 const bucketStorage = f . getInstance ( syncRules ) ;
121123
122- const result = await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
124+ await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
125+ await batch . markAllSnapshotDone ( '0/1' ) ;
123126 await batch . save ( {
124127 sourceTable : TEST_TABLE ,
125128 tag : storage . SaveOperationTag . INSERT ,
@@ -184,6 +187,7 @@ bucket_definitions:
184187 const bucketStorage = f . getInstance ( syncRules ) ;
185188
186189 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
190+ await batch . markAllSnapshotDone ( '0/1' ) ;
187191 // Initial data: Add one priority row and 10k low-priority rows.
188192 await batch . save ( {
189193 sourceTable : TEST_TABLE ,
@@ -297,6 +301,7 @@ bucket_definitions:
297301 const bucketStorage = f . getInstance ( syncRules ) ;
298302
299303 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
304+ await batch . markAllSnapshotDone ( '0/1' ) ;
300305 // Initial data: Add one priority row and 10k low-priority rows.
301306 await batch . save ( {
302307 sourceTable : TEST_TABLE ,
@@ -441,6 +446,7 @@ bucket_definitions:
441446 const bucketStorage = f . getInstance ( syncRules ) ;
442447
443448 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
449+ await batch . markAllSnapshotDone ( '0/1' ) ;
444450 // Initial data: Add one priority row and 10k low-priority rows.
445451 await batch . save ( {
446452 sourceTable : TEST_TABLE ,
@@ -573,6 +579,7 @@ bucket_definitions:
573579 const bucketStorage = f . getInstance ( syncRules ) ;
574580
575581 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
582+ await batch . markAllSnapshotDone ( '0/1' ) ;
576583 await batch . save ( {
577584 sourceTable : TEST_TABLE ,
578585 tag : storage . SaveOperationTag . INSERT ,
@@ -640,6 +647,7 @@ bucket_definitions:
640647 const bucketStorage = await f . getInstance ( syncRules ) ;
641648
642649 const result = await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
650+ await batch . markAllSnapshotDone ( '0/1' ) ;
643651 await batch . save ( {
644652 sourceTable : TEST_TABLE ,
645653 tag : storage . SaveOperationTag . INSERT ,
@@ -717,6 +725,7 @@ bucket_definitions:
717725 const bucketStorage = await f . getInstance ( syncRules ) ;
718726 // Activate
719727 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
728+ await batch . markAllSnapshotDone ( '0/0' ) ;
720729 await batch . keepalive ( '0/0' ) ;
721730 } ) ;
722731
@@ -794,6 +803,7 @@ bucket_definitions:
794803 const bucketStorage = await f . getInstance ( syncRules ) ;
795804 // Activate
796805 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
806+ await batch . markAllSnapshotDone ( '0/0' ) ;
797807 await batch . keepalive ( '0/0' ) ;
798808 } ) ;
799809
@@ -863,6 +873,7 @@ bucket_definitions:
863873 const bucketStorage = await f . getInstance ( syncRules ) ;
864874
865875 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
876+ await batch . markAllSnapshotDone ( '0/1' ) ;
866877 await batch . save ( {
867878 sourceTable : usersTable ,
868879 tag : storage . SaveOperationTag . INSERT ,
@@ -943,6 +954,7 @@ bucket_definitions:
943954 const bucketStorage = await f . getInstance ( syncRules ) ;
944955 // Activate
945956 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
957+ await batch . markAllSnapshotDone ( '0/0' ) ;
946958 await batch . keepalive ( '0/0' ) ;
947959 } ) ;
948960
@@ -971,6 +983,7 @@ bucket_definitions:
971983 expect ( await getCheckpointLines ( iter ) ) . toMatchSnapshot ( ) ;
972984
973985 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
986+ await batch . markAllSnapshotDone ( '0/1' ) ;
974987 await batch . save ( {
975988 sourceTable : listsTable ,
976989 tag : storage . SaveOperationTag . INSERT ,
@@ -1012,6 +1025,7 @@ bucket_definitions:
10121025 const bucketStorage = await f . getInstance ( syncRules ) ;
10131026 // Activate
10141027 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1028+ await batch . markAllSnapshotDone ( '0/0' ) ;
10151029 await batch . keepalive ( '0/0' ) ;
10161030 } ) ;
10171031
@@ -1060,6 +1074,7 @@ bucket_definitions:
10601074 const bucketStorage = await f . getInstance ( syncRules ) ;
10611075
10621076 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1077+ await batch . markAllSnapshotDone ( '0/1' ) ;
10631078 await batch . save ( {
10641079 sourceTable : TEST_TABLE ,
10651080 tag : storage . SaveOperationTag . INSERT ,
@@ -1118,6 +1133,7 @@ bucket_definitions:
11181133 // This invalidates the checkpoint we've received above.
11191134
11201135 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1136+ await batch . markAllSnapshotDone ( '0/1' ) ;
11211137 await batch . save ( {
11221138 sourceTable : TEST_TABLE ,
11231139 tag : storage . SaveOperationTag . UPDATE ,
@@ -1205,6 +1221,7 @@ bucket_definitions:
12051221 const bucketStorage = f . getInstance ( syncRules ) ;
12061222
12071223 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1224+ await batch . markAllSnapshotDone ( '0/1' ) ;
12081225 // <= the managed write checkpoint LSN below
12091226 await batch . commit ( '0/1' ) ;
12101227 } ) ;
@@ -1243,6 +1260,7 @@ bucket_definitions:
12431260 } ) ;
12441261
12451262 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1263+ await batch . markAllSnapshotDone ( '0/1' ) ;
12461264 // must be >= the managed write checkpoint LSN
12471265 await batch . commit ( '1/0' ) ;
12481266 } ) ;
@@ -1278,6 +1296,7 @@ config:
12781296 const bucketStorage = f . getInstance ( syncRules ) ;
12791297
12801298 await bucketStorage . startBatch ( test_utils . BATCH_OPTIONS , async ( batch ) => {
1299+ await batch . markAllSnapshotDone ( '0/1' ) ;
12811300 await batch . save ( {
12821301 sourceTable : TEST_TABLE ,
12831302 tag : storage . SaveOperationTag . INSERT ,
0 commit comments