@@ -222,16 +222,28 @@ read_header(Config) ->
222
222
{ok , R0 } = osiris_log :init_offset_reader (first ,
223
223
Conf #{offset_ref => OffRef }),
224
224
{end_of_stream , R1 } = osiris_log :read_header (R0 ),
225
- _W1 = osiris_log :write ([<<" hi" >>, <<" ho" >>], W0 ),
226
- atomics :put (OffRef , 1 , 1 ),
227
- ? assertMatch ({ok , #{chunk_id := 0 ,
228
- epoch := 1 ,
229
- type := 0 ,
230
- num_records := 2 ,
231
- num_entries := 2 ,
232
- timestamp := _ ,
233
- data_size := _ ,
234
- trailer_size := 0 }, _ }, osiris_log :read_header (R1 )),
225
+ W1 = osiris_log :write ([<<" hi" >>, <<" ho" >>], W0 ),
226
+ _W = osiris_log :write ([<<" hum" >>], W1 ),
227
+ atomics :put (OffRef , 1 , 3 ),
228
+ {ok , H1 , R2 } = osiris_log :read_header (R1 ),
229
+ ? assertMatch (#{chunk_id := 0 ,
230
+ epoch := 1 ,
231
+ type := 0 ,
232
+ num_records := 2 ,
233
+ num_entries := 2 ,
234
+ timestamp := _ ,
235
+ data_size := _ ,
236
+ trailer_size := 0 }, H1 ),
237
+ {ok , H2 , R3 } = osiris_log :read_header (R2 ),
238
+ ? assertMatch (#{chunk_id := 2 ,
239
+ epoch := 1 ,
240
+ type := 0 ,
241
+ num_records := 1 ,
242
+ num_entries := 1 ,
243
+ timestamp := _ ,
244
+ data_size := _ ,
245
+ trailer_size := 0 }, H2 ),
246
+ {end_of_stream , _R } = osiris_log :read_header (R3 ),
235
247
ok .
236
248
237
249
write_multi_log (Config ) ->
0 commit comments