| @@ 16-33 (lines=18) @@ | ||
| 13 | } |
|
| 14 | ||
| 15 | ||
| 16 | public function testProcess() |
|
| 17 | { |
|
| 18 | try |
|
| 19 | { |
|
| 20 | $mqueue = new \Aimeos\MW\MQueue\Beanstalk( array( 'conntimeout' => 1, 'readtimeout' => 1 ) ); |
|
| 21 | $queue = $mqueue->getQueue( 'aimeos_unittest' ); |
|
| 22 | } |
|
| 23 | catch( \Aimeos\MW\MQueue\Exception $e ) |
|
| 24 | { |
|
| 25 | $this->markTestSkipped( 'No Stomp compliant server available at "localhost"' ); |
|
| 26 | } |
|
| 27 | ||
| 28 | $queue->add( 'testmsg' ); |
|
| 29 | $msg = $queue->get(); |
|
| 30 | $queue->del( $msg ); |
|
| 31 | ||
| 32 | $this->assertNull( $queue->get() ); |
|
| 33 | } |
|
| 34 | ||
| 35 | ||
| 36 | public function testSingleConnection() |
|
| @@ 16-34 (lines=19) @@ | ||
| 13 | } |
|
| 14 | ||
| 15 | ||
| 16 | public function testProcess() |
|
| 17 | { |
|
| 18 | try |
|
| 19 | { |
|
| 20 | $config = array( 'username' => 'guest', 'password' => 'guest' ); |
|
| 21 | $mqueue = new \Aimeos\MW\MQueue\Stomp( $config ); |
|
| 22 | $queue = $mqueue->getQueue( 'aimeos_unittest' ); |
|
| 23 | } |
|
| 24 | catch( \Aimeos\MW\MQueue\Exception $e ) |
|
| 25 | { |
|
| 26 | $this->markTestSkipped( 'No Stomp compliant server available at "localhost"' ); |
|
| 27 | } |
|
| 28 | ||
| 29 | $queue->add( 'testmsg' ); |
|
| 30 | $msg = $queue->get(); |
|
| 31 | $queue->del( $msg ); |
|
| 32 | ||
| 33 | $this->assertNull( $queue->get() ); |
|
| 34 | } |
|
| 35 | ||
| 36 | ||
| 37 | public function testGetQueueSingleConnection() |
|