@@ -28,6 +28,7 @@ async fn test_sync_context_push_frame() {
28
28
29
29
// Push a frame and verify the response
30
30
let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
31
+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
31
32
assert_eq ! ( durable_frame, 1 ) ; // First frame should return max_frame_no = 1
32
33
33
34
// Verify internal state was updated
@@ -55,6 +56,7 @@ async fn test_sync_context_with_auth() {
55
56
let mut sync_ctx = sync_ctx;
56
57
57
58
let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
59
+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
58
60
assert_eq ! ( durable_frame, 1 ) ;
59
61
assert_eq ! ( server. frame_count( ) , 1 ) ;
60
62
}
@@ -80,6 +82,7 @@ async fn test_sync_context_multiple_frames() {
80
82
for i in 0 ..3 {
81
83
let frame = Bytes :: from ( format ! ( "frame data {}" , i) ) ;
82
84
let durable_frame = sync_ctx. push_one_frame ( frame, 1 , i) . await . unwrap ( ) ;
85
+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
83
86
assert_eq ! ( durable_frame, i + 1 ) ;
84
87
assert_eq ! ( sync_ctx. durable_frame_num( ) , i + 1 ) ;
85
88
assert_eq ! ( server. frame_count( ) , i + 1 ) ;
@@ -105,6 +108,7 @@ async fn test_sync_context_corrupted_metadata() {
105
108
let mut sync_ctx = sync_ctx;
106
109
let frame = Bytes :: from ( "test frame data" ) ;
107
110
let durable_frame = sync_ctx. push_one_frame ( frame, 1 , 0 ) . await . unwrap ( ) ;
111
+ sync_ctx. write_metadata ( ) . await . unwrap ( ) ;
108
112
assert_eq ! ( durable_frame, 1 ) ;
109
113
assert_eq ! ( server. frame_count( ) , 1 ) ;
110
114
0 commit comments