Tripal
|
Protected Member Functions | |
setUp () | |
Protected Attributes | |
$sharedLocker | |
$internalLocker | |
$state | |
Tests for PersistentDatabaseSharedLockBackend.
Note: we use PersistentDatabaseLockBackend instead of DatabaseLockBackend in these tests when we need another type of lock backend because DatabaseLockBackend registers shutdown function releaseAll() which will raise an error when an unexpected error occurs during tests, silencing the real problem. It's because at shutdown, the semaphore table in the test schema is already removed when releaseAll() is called leading to the error:
@coversDefaultClass \Drupal\tripal_biodb\Lock\PersistentDatabaseSharedLockBackend
@group Tripal @group Tripal BioDb @group Tripal BioDb Lock
|
protected |
Tests setup method.
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedDetails | ( | ) |
Tests acquireShared can extend a timeout.
@covers ::acquireShared @covers ::getOwnerPid @covers ::getStartTime
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedExistingExclusiveLock | ( | ) |
Tests acquireShared can not use an existing exclusive lock as main lock.
@covers ::acquireShared @covers ::lockMayBeAvailable
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedExistingMainLock | ( | ) |
Tests acquireShared can use an existing main shared lock.
@covers ::acquireShared @covers ::lockMayBeAvailable
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedExtendTimeout | ( | ) |
Tests acquireShared can extend a timeout.
@covers ::acquireShared
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedNoMainLock | ( | ) |
Tests acquireShared can allocate a main shared lock.
@covers ::acquireShared
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireSharedWithoutState | ( | ) |
Tests acquireShared will stop if it could not use state API.
@covers ::acquireShared
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testAcquireWithoutState | ( | ) |
Tests acquire will continue even if it could not use state API to store infos.
@covers ::acquire
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testExclusiveLockBasics | ( | ) |
Tests exclusive lock.
@covers ::acquire
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testGetCurrentExpirationDelay | ( | ) |
Tests expiration delay.
@covers ::getCurrentExpirationDelay
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testNoReleaseOnShared | ( | ) |
Tests no exclusive release on shared locks.
@covers ::release @covers ::lockMayBeAvailable
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testNoReleaseOther | ( | ) |
Tests no release other locks.
@covers ::release @covers ::lockMayBeAvailable
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testNoReleaseSharedOnExclusive | ( | ) |
Tests no releaseShared on exclusive locks.
@covers ::releaseShared @covers ::lockMayBeAvailable
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testNotAcquireWhenShared | ( | ) |
Tests exclusive acquire denies a shared lock.
@covers ::acquire
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testReleaseAllOwn | ( | ) |
Tests releaseAll only release all owned locks.
@covers ::releaseAll @covers ::lockMayBeAvailable @covers ::cleanUnusedSharedLocks
Drupal\Tests\tripal_biodb\Unit\Lock\PersistentDatabaseSharedLockBackendTest::testSharedLockBasics | ( | ) |
Tests shared lock.
@covers ::acquire