forked from php-amqp/php-amqp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bug_gh50-3.phpt
47 lines (36 loc) · 855 Bytes
/
bug_gh50-3.phpt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--TEST--
Channel creation race condition (https://github.com/pdezwart/php-amqp/issues/50) (3)
--SKIPIF--
<?php if (!extension_loaded("amqp")) print "skip"; ?>
--FILE--
<?php
$connection = new AMQPConnection();
$connection->connect();
for ($i = 0; $i < 3; $i++) {
$channel = new AMQPChannel($connection);
var_dump($channel->getChannelId());
$queue = new AMQPQueue($channel);
$queue->setName('test' . $i);
$queue->declareQueue();
$queue->delete();
}
$connection = new AMQPConnection();
$connection->connect();
for ($i = 0; $i < 3; $i++) {
$channel = new AMQPChannel($connection);
var_dump($channel->getChannelId());
$queue = new AMQPQueue($channel);
$queue->setName('test' . $i);
$queue->declareQueue();
$queue->delete();
}
?>
==DONE==
--EXPECT--
int(1)
int(2)
int(3)
int(1)
int(2)
int(3)
==DONE==