@@ -695,7 +695,8 @@ mod tests {
695695 " ) ;
696696 }
697697
698- /// Ensure that a PR can be associated to multiple rollups in case of CI failure in the initial rollup
698+ /// Ensure that a PR can be associated to multiple rollups.
699+ /// This can happen when opening a new rollup similar to an existing one, before closing the old one.
699700 #[ sqlx:: test]
700701 async fn multiple_rollups_same_pr ( pool : sqlx:: PgPool ) {
701702 let gh = run_test ( ( pool, rollup_state ( ) ) , async |ctx : & mut BorsTester | {
@@ -705,16 +706,19 @@ mod tests {
705706 ctx. approve ( pr3. id ( ) ) . await ?;
706707
707708 make_rollup ( ctx, & [ & pr2, & pr3] ) . await ?;
708- // Simulate a maintainer closing the rollup due to a CI failure requiring popping a PR from the contents
709- ctx. set_pr_status_closed ( 4 ) . await ?;
710709 make_rollup ( ctx, & [ & pr3] ) . await ?;
711- // Ensure both rollups have the requested PRs
712710 assert_eq ! (
713711 ctx. db( ) . get_nonclosed_rollups( & pr2. repo) . await ?,
714- HashMap :: from( [ (
715- PullRequestNumber ( 5 ) ,
716- HashSet :: from_iter( vec![ PullRequestNumber ( 3 ) ] )
717- ) ] )
712+ HashMap :: from( [
713+ (
714+ PullRequestNumber ( 4 ) ,
715+ HashSet :: from_iter( vec![ PullRequestNumber ( 2 ) , PullRequestNumber ( 3 ) ] )
716+ ) ,
717+ (
718+ PullRequestNumber ( 5 ) ,
719+ HashSet :: from_iter( vec![ PullRequestNumber ( 3 ) ] )
720+ )
721+ ] )
718722 ) ;
719723 Ok ( ( ) )
720724 } )
@@ -723,8 +727,8 @@ mod tests {
723727 insta:: assert_snapshot!( repo. lock( ) . get_pr( 4 ) . description, @"
724728 Successful merges:
725729
726- - #2 (Title of PR 2)
727- - #3 (Title of PR 3)
730+ - rust-lang/borstest #2 (Title of PR 2)
731+ - rust-lang/borstest #3 (Title of PR 3)
728732
729733 r? @ghost
730734
0 commit comments