1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<?php
namespace PhpAmqpLib\Tests\Functional\Connection;
use PhpAmqpLib\Tests\Functional\AbstractConnectionTestCase;
use PhpAmqpLib\Tests\Functional\Channel\ChannelWaitTest;
use PHPUnit\Framework\Attributes\Test;
class AMQPStreamConnectionTest extends AbstractConnectionTestCase
{
/**
* @group connection
* @covers \PhpAmqpLib\Wire\IO\StreamIO::select()
*/
#[Test]
public function connection_select_blocking_wo_timeout(): void
{
$connection = $this->connection_create('stream');
$start = microtime(true);
ChannelWaitTest::deferSignal(1);
$result = $connection->select(null);
$took = microtime(true) - $start;
self::assertEquals(0, $result);
self::assertGreaterThanOrEqual(.9, $took);
}
}
|