NOTE: Test on both "clean install" and "upgraded website".
Test plan
- in the Admin Console
- if the Semaphores database table isn't empty, then clear it
- go to the Configuration → Website → Advanced section
- confirm, that the Delete Stuck Semaphores after system setting is present
- go to Configuration → Website → Stop Words section
- open any record for editing
- save it
- confirm, that the Semaphores table is still empty
- in IDE:
- open \kTempTablesHandler::SaveEdit method for editing
- comment-out the code, that deletes a semaphore (between $ids = $this->DoCopyTempToOriginal($this->Tables, null, $master_ids); and return $ids;
- save changes
- in the Admin Console
- go to Configuration → Website → Stop Words section
- open any record for editing
- save it
- confirm, that the Semaphores table has 1 record now related to the edited record
- go to the Configuration → Website → Scheduled Tasks section
- run the delete_stuck_semaphores scheduled task
- confirm, that above added semaphore record is still present in the Semaphores table
- go to Configuration → Website → Stop Words section
- open same record for editing and try to save it
- confirm, that:
- after a delay of 30 seconds you'll see an alert explaining that saving has failed
- the record was added to the Logs & Reports → System Logs section about a parallel editing attempt
- subtract 305 from the Timestamp column value of the above-added semaphore record (+save changes to db)
- run the delete_stuck_semaphores scheduled task
- confirm, that:
- the above-added semaphore record is removed from the Semaphores table
- the record was added to the Logs & Reports → System Logs section about a detected stuck semaphore