diff --git a/tests/Sync/ParcelTest.php b/tests/Sync/ParcelTest.php index d3ae8ad..a95608e 100644 --- a/tests/Sync/ParcelTest.php +++ b/tests/Sync/ParcelTest.php @@ -4,6 +4,9 @@ namespace Icicle\Tests\Concurrent\Sync; use Icicle\Concurrent\Sync\Parcel; use Icicle\Tests\Concurrent\TestCase; +/** + * @requires extension shmop + */ class ParcelTest extends TestCase { public function testConstructor() @@ -88,6 +91,7 @@ class ParcelTest extends TestCase /** * @group posix + * @requires extension pcntl */ public function testSetInSeparateProcess() { @@ -103,6 +107,7 @@ class ParcelTest extends TestCase /** * @group posix + * @requires extension pcntl */ public function testFreeInSeparateProcess() { diff --git a/tests/Sync/PosixSemaphoreTest.php b/tests/Sync/PosixSemaphoreTest.php index dddabc7..ec700ae 100644 --- a/tests/Sync/PosixSemaphoreTest.php +++ b/tests/Sync/PosixSemaphoreTest.php @@ -8,6 +8,8 @@ use Icicle\Tests\Concurrent\TestCase; /** * @group posix + * @requires extension shmop + * @requires extension sysvsem */ class PosixSemaphoreTest extends TestCase { diff --git a/tests/Sync/ThreadedMutexTest.php b/tests/Sync/ThreadedMutexTest.php index 542e01b..11982bb 100644 --- a/tests/Sync/ThreadedMutexTest.php +++ b/tests/Sync/ThreadedMutexTest.php @@ -8,6 +8,7 @@ use Icicle\Tests\Concurrent\TestCase; /** * @group threading + * @requires extension pthreads */ class ThreadedMutexTest extends TestCase { @@ -46,6 +47,6 @@ class ThreadedMutexTest extends TestCase }); Loop\run(); - }, 1.5, 1.65); + }, 1.5, 1.7); } } diff --git a/tests/Sync/ThreadedSemaphoreTest.php b/tests/Sync/ThreadedSemaphoreTest.php index d3fae23..5976757 100644 --- a/tests/Sync/ThreadedSemaphoreTest.php +++ b/tests/Sync/ThreadedSemaphoreTest.php @@ -8,6 +8,7 @@ use Icicle\Tests\Concurrent\TestCase; /** * @group threading + * @requires extension pthreads */ class ThreadedSemaphoreTest extends TestCase { @@ -52,6 +53,6 @@ class ThreadedSemaphoreTest extends TestCase }); Loop\run(); - }, 1.5, 1.65); + }, 1.5, 1.7); } } diff --git a/tests/Threading/LocalObjectTest.php b/tests/Threading/LocalObjectTest.php index dd695b9..fb9fb22 100644 --- a/tests/Threading/LocalObjectTest.php +++ b/tests/Threading/LocalObjectTest.php @@ -82,14 +82,17 @@ class LocalObjectTest extends TestCase $this->assertSame($object, $local->deref()); } + /** + * @requires extension pthreads + */ public function testPromiseInThread() { $thread = \Thread::from(function () { require __DIR__.'/../../vendor/autoload.php'; - $promise = new LocalObject(new Promise()); + $promise = new LocalObject(new Promise(function ($resolve, $reject) {})); }); - $thread->start(PTHREADS_INHERIT_INI); + $thread->start(); $thread->join(); }