File tree Expand file tree Collapse file tree
libsql-server/tests/embedded_replica Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,6 +179,8 @@ fn execute_batch() {
179179 conn. execute ( "CREATE TABLE user (id INTEGER NOT NULL PRIMARY KEY)" , ( ) )
180180 . await ?;
181181
182+ assert_eq ! ( db. max_write_replication_index( ) , Some ( 1 ) ) ;
183+
182184 let n = db. sync ( ) . await ?. frame_no ( ) ;
183185 assert_eq ! ( n, Some ( 1 ) ) ;
184186
@@ -231,6 +233,7 @@ fn stream() {
231233
232234 conn. execute ( "CREATE TABLE user (id INTEGER NOT NULL PRIMARY KEY)" , ( ) )
233235 . await ?;
236+ assert_eq ! ( db. max_write_replication_index( ) , Some ( 1 ) ) ;
234237
235238 let n = db. sync ( ) . await ?. frame_no ( ) ;
236239 assert_eq ! ( n, Some ( 1 ) ) ;
@@ -244,8 +247,10 @@ fn stream() {
244247 " ,
245248 )
246249 . await ?;
250+ let replication_index = db. max_write_replication_index ( ) ;
247251
248- db. sync ( ) . await . unwrap ( ) ;
252+ let synced_replication_index = db. sync ( ) . await . unwrap ( ) . frame_no ( ) ;
253+ assert_eq ! ( synced_replication_index, replication_index) ;
249254
250255 let rows = conn. query ( "select * from user" , ( ) ) . await . unwrap ( ) ;
251256
You can’t perform that action at this time.
0 commit comments