@@ -28,6 +28,7 @@ async fn test_sync_context_push_frame() {
2828
2929 // Push a frame and verify the response
3030 let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
31+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
3132 assert_eq ! ( durable_frame, 1 ) ; // First frame should return max_frame_no = 1
3233
3334 // Verify internal state was updated
@@ -55,6 +56,7 @@ async fn test_sync_context_with_auth() {
5556 let mut sync_ctx = sync_ctx;
5657
5758 let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
59+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
5860 assert_eq ! ( durable_frame, 1 ) ;
5961 assert_eq ! ( server. frame_count( ) , 1 ) ;
6062}
@@ -80,6 +82,7 @@ async fn test_sync_context_multiple_frames() {
8082 for i in 0 ..3 {
8183 let frame = Bytes :: from ( format ! ( "frame data {}" , i) ) ;
8284 let durable_frame = sync_ctx. push_one_frame ( frame, 1 , i) . await . unwrap ( ) ;
85+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
8386 assert_eq ! ( durable_frame, i + 1 ) ;
8487 assert_eq ! ( sync_ctx. durable_frame_num( ) , i + 1 ) ;
8588 assert_eq ! ( server. frame_count( ) , i + 1 ) ;
@@ -105,6 +108,7 @@ async fn test_sync_context_corrupted_metadata() {
105108 let mut sync_ctx = sync_ctx;
106109 let frame = Bytes :: from ( "test frame data" ) ;
107110 let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
111+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
108112 assert_eq ! ( durable_frame, 1 ) ;
109113 assert_eq ! ( server. frame_count( ) , 1 ) ;
110114
0 commit comments