function system_test_lock_exit in Drupal 7
Try to acquire a specific lock, and then exit.
2 string references to 'system_test_lock_exit'
- LockFunctionalTest::testLockAcquire in modules/
simpletest/ tests/ lock.test - Confirm that we can acquire and release locks in two parallel requests.
- system_test_menu in modules/
simpletest/ tests/ system_test.module - Implements hook_menu().
File
- modules/
simpletest/ tests/ system_test.module, line 349
Code
function system_test_lock_exit() {
if (lock_acquire('system_test_lock_exit', 900)) {
echo 'TRUE: Lock successfully acquired in system_test_lock_exit()';
// The shut-down function should release the lock.
exit;
}
else {
return 'FALSE: Lock not acquired in system_test_lock_exit()';
}
}