Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F632659
amqpchannel_confirmSelect.phpt
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
amqpchannel_confirmSelect.phpt
View Options
--TEST--
AMQPChannel::confirmSelect()
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
elseif (!getenv("PHP_AMQP_HOST")) print "skip PHP_AMQP_HOST environment variable is not set";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->connect();
$ch = new AMQPChannel($cnn);
$ch->confirmSelect();
echo 'confirm.select: OK', PHP_EOL;
try {
$ch->startTransaction();
} catch (Exception $e) {
echo get_class($e), "({$e->getCode()}): " . $e->getMessage(), PHP_EOL;
}
$ch = new AMQPChannel($cnn);
$ch->startTransaction();
echo 'transaction.start: OK', PHP_EOL;
try {
$ch->confirmSelect();
} catch (Exception $e) {
echo get_class($e), "({$e->getCode()}): " . $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
confirm.select: OK
AMQPChannelException(406): Server channel error: 406, message: PRECONDITION_FAILED - cannot switch from confirm to tx mode
transaction.start: OK
AMQPChannelException(406): Server channel error: 406, message: PRECONDITION_FAILED - cannot switch from tx to confirm mode
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 2:53 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
145597
Default Alt Text
amqpchannel_confirmSelect.phpt (1 KB)
Attached To
Mode
R113 php-ampqp
Attached
Detach File
Event Timeline