Skip to content

Commit

Permalink
Fix tests and test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbusu-motork committed Jun 19, 2024
1 parent d37ff6b commit 628ee29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while getopts "bustefdp" OPTION; do
docker-compose stop
;;
e)
docker exec -it mqdev_dev_1 /bin/bash
docker exec -it enqueue-dev-dev-1 /bin/bash
;;
f)
./bin/php-cs-fixer fix
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ services:
SERVICES: 'sqs,sns'
EAGER_SERVICE_LOADING: '1'
DEFAULT_REGION: 'us-east-1'
networks:
default:
aliases:
- 'localstack'
- 'sqs.us-east-1.localstack'

influxdb:
image: 'influxdb:latest'
Expand Down
12 changes: 6 additions & 6 deletions pkg/amqp-ext/Tests/Functional/AmqpCommonUseCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function testConsumerReceiveMessageFromTopicDirectly()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
Expand All @@ -168,9 +168,9 @@ public function testConsumerReceiveMessageFromTopicDirectly()
$actualMessage = $consumer->receive(1000);

$this->assertInstanceOf(AmqpMessage::class, $actualMessage);
$consumer->acknowledge($message);
$consumer->acknowledge($actualMessage);

$this->assertEquals(__METHOD__, $message->getBody());
$this->assertEquals(__METHOD__, $actualMessage->getBody());
}

public function testConsumerReceiveMessageWithZeroTimeout()
Expand All @@ -181,7 +181,7 @@ public function testConsumerReceiveMessageWithZeroTimeout()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
Expand All @@ -192,9 +192,9 @@ public function testConsumerReceiveMessageWithZeroTimeout()
$actualMessage = $consumer->receive(0);

$this->assertInstanceOf(AmqpMessage::class, $actualMessage);
$consumer->acknowledge($message);
$consumer->acknowledge($actualMessage);

$this->assertEquals(__METHOD__, $message->getBody());
$this->assertEquals(__METHOD__, $actualMessage->getBody());
}

public function testPurgeMessagesFromQueue()
Expand Down

0 comments on commit 628ee29

Please sign in to comment.