File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -546,6 +546,17 @@ def test_terminated_fetch_releases_lock_without_continuing(self):
546546 self .assertEqual (process .returncode , 143 )
547547 with self .assertRaises (ProcessLookupError ):
548548 os .kill (child_pid , 0 )
549+
550+ # Some CI shells leave the directory entry behind after a
551+ # signal interrupts a foreground wait. The next fetch must
552+ # still prove the stale owner is recoverable and does not
553+ # block future work.
554+ recovery_environment = environment .copy ()
555+ recovery_environment .pop ("STUB_BLOCK_STARTED" )
556+ recovery_environment .pop ("STUB_BLOCK_PID" )
557+ recovery_environment .pop ("STUB_BLOCK_FOREVER" )
558+ recovered = self .run_fetch (recovery_environment , timeout = 5 )
559+ self .assertEqual (recovered .returncode , 0 , recovered .stderr )
549560 self .assertFalse ((cache / ".pg_compat.lock" ).exists ())
550561 finally :
551562 if process .poll () is None :
You can’t perform that action at this time.
0 commit comments