PHP Class malkusch\lock\mutex\SpinlockMutexTest

See also: SpinlockMutex
Author: Markus Malkusch ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase, use trait phpmock\phpunit\PHPMock
Show file Open project: malkusch/lock

Public Methods

Method Description
testAcquireTimesOut ( ) Tests failing to acquire the lock due to a timeout.
testExecuteBarelySucceeds ( ) Tests executing code which barely doesn't hit the timeout.
testExecuteTimeoutLeavesOneSecondForKeyToExpire ( ) Tests executing exactly unitl the timeout will leave the key one more second.
testExecuteTooLong ( ) Tests executing code which exceeds the timeout fails.
testFailAcquireLock ( ) Tests failing to acquire the lock.
testFailReleasingLock ( ) Tests failing to release a lock.

Protected Methods

Method Description
setUp ( )

Method Details

setUp() protected method

protected setUp ( )

testAcquireTimesOut() public method

Tests failing to acquire the lock due to a timeout.
public testAcquireTimesOut ( )

testExecuteBarelySucceeds() public method

Tests executing code which barely doesn't hit the timeout.

testExecuteTimeoutLeavesOneSecondForKeyToExpire() public method

Tests executing exactly unitl the timeout will leave the key one more second.

testExecuteTooLong() public method

Tests executing code which exceeds the timeout fails.
public testExecuteTooLong ( )

testFailAcquireLock() public method

Tests failing to acquire the lock.
public testFailAcquireLock ( )

testFailReleasingLock() public method

Tests failing to release a lock.