File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -583,15 +583,16 @@ test("can set frameMax", async () => {
583583 const ch = await conn . channel ( )
584584 await ch . confirmSelect ( )
585585 const q = await ch . queue ( "" )
586- await q . publish ( "" , { headers : { a : "a" . repeat ( 15000 ) } } )
586+ const headerValue = "a" . repeat ( conn . frameMax - 100 ) // leave some space for other parts of the frame
587+ await q . publish ( "" , { headers : { a : headerValue } } )
587588 const msg = await q . get ( )
588589 if ( msg ) {
589590 const props = msg . properties
590591 if ( props ) {
591592 const headers = props . headers
592593 if ( headers ) {
593594 const a = headers [ "a" ] as string
594- expect ( a . length ) . toEqual ( 15000 )
595+ expect ( a . length ) . toEqual ( headerValue . length )
595596 } else expect ( headers ) . toBeTruthy ( )
596597 } else expect ( props ) . toBeTruthy ( )
597598 } else expect ( msg ) . toBeTruthy ( )
You can’t perform that action at this time.
0 commit comments