Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[travis] allow kafka tests to fail. #237

Merged
merged 1 commit into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ matrix:
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true
allow_failures:
- php: 7.1
services: docker
env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true

cache:
directories:
Expand All @@ -44,13 +48,17 @@ install:
- if [ "$FUNCTIONAL_TESTS" = true ]; then docker --version; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then docker-compose --version; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi
- if [ "$RDKAFKA_TESTS" = true ]; then docker --version; fi
- if [ "$RDKAFKA_TESTS" = true ]; then docker-compose --version; fi
- if [ "$RDKAFKA_TESTS" = true ]; then bin/dev -b; fi

script:
- if [ "$PHPSTAN" = true ]; then composer require "phpstan/phpstan:^0.8" ; php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/gps pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test pkg/rdkafka; fi
- if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi
- if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t --exclude-group=rdkafka; fi
- if [ "RDKAFKA_TESTS" = true ]; then bin/dev -t --group=rdkafka; fi

notifications:
webhooks:
Expand Down
2 changes: 1 addition & 1 deletion bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ while getopts "bustefcd" OPTION; do
./bin/php-cs-fixer fix
;;
t)
COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$2"
COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$2" "$3" "$4"
;;
c)
COMPOSE_PROJECT_NAME=mqdev docker-compose run -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN:-""} --workdir="/mqdev" --rm generate-changelog github_changelog_generator --future-release "$2" --simple-list
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/JsonSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use Enqueue\Test\ClassExtensionTrait;
use PHPUnit\Framework\TestCase;

/**
* @group rdkafka
*/
class JsonSerializerTest extends TestCase
{
use ClassExtensionTrait;
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaConnectionFactory;
use PHPUnit\Framework\TestCase;

/**
* @group rdkafka
*/
class RdKafkaConnectionFactoryTest extends TestCase
{
public function testThrowNeitherArrayStringNorNullGivenAsConfig()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use RdKafka\KafkaConsumer;
use RdKafka\Message;

/**
* @group rdkafka
*/
class RdKafkaConsumerTest extends TestCase
{
public function testCouldBeConstructedWithRequiredArguments()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Interop\Queue\InvalidDestinationException;
use PHPUnit\Framework\TestCase;

/**
* @group rdkafka
*/
class RdKafkaContextTest extends TestCase
{
public function testThrowNotImplementedOnCreateTemporaryQueue()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use PHPUnit\Framework\TestCase;
use RdKafka\Message;

/**
* @group rdkafka
*/
class RdKafkaMessageTest extends TestCase
{
public function testCouldSetGetPartition()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use RdKafka\ProducerTopic;
use RdKafka\TopicConf;

/**
* @group rdkafka
*/
class RdKafkaProducerTest extends TestCase
{
public function testCouldBeConstructedWithKafkaProducerAndSerializerAsArguments()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/RdKafkaTopicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use PHPUnit\Framework\TestCase;
use RdKafka\TopicConf;

/**
* @group rdkafka
*/
class RdKafkaTopicTest extends TestCase
{
public function testCouldSetGetPartition()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/Spec/RdKafkaConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaConnectionFactory;
use Interop\Queue\Spec\PsrConnectionFactorySpec;

/**
* @group rdkafka
*/
class RdKafkaConnectionFactoryTest extends PsrConnectionFactorySpec
{
protected function createConnectionFactory()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/Spec/RdKafkaContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaContext;
use Interop\Queue\Spec\PsrContextSpec;

/**
* @group rdkafka
*/
class RdKafkaContextTest extends PsrContextSpec
{
protected function createContext()
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/Spec/RdKafkaMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaMessage;
use Interop\Queue\Spec\PsrMessageSpec;

/**
* @group rdkafka
*/
class RdKafkaMessageTest extends PsrMessageSpec
{
/**
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/Spec/RdKafkaQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaTopic;
use Interop\Queue\Spec\PsrQueueSpec;

/**
* @group rdkafka
*/
class RdKafkaQueueTest extends PsrQueueSpec
{
protected function createQueue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Interop\Queue\Spec\SendToAndReceiveFromTopicSpec;

/**
* @group rdkafka
* @group functional
* @retry 5
*/
Expand Down
3 changes: 3 additions & 0 deletions pkg/rdkafka/Tests/Spec/RdKafkaTopicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Enqueue\RdKafka\RdKafkaTopic;
use Interop\Queue\Spec\PsrTopicSpec;

/**
* @group rdkafka
*/
class RdKafkaTopicTest extends PsrTopicSpec
{
/**
Expand Down