Skip to content

Commit

Permalink
Merge 7cd0c16 into 1ccb2f0
Browse files Browse the repository at this point in the history
  • Loading branch information
macalimlim committed Apr 30, 2021
2 parents 1ccb2f0 + 7cd0c16 commit c521b3e
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 318 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ setup:
sleep 10
docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper
docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(another_test_topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper

test: setup
ZIGGURAT_STREAM_ROUTER_DEFAULT_ORIGIN_TOPIC=$(topic) lein test
TESTING_TYPE=default lein test
docker-compose down

setup-cluster:
Expand All @@ -24,10 +25,12 @@ setup-cluster:
# Sleeping for 30s to allow the cluster to come up
docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1
docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(another_test_topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1

test-cluster: setup-cluster
ZIGGURAT_STREAM_ROUTER_DEFAULT_ORIGIN_TOPIC=$(topic) lein test-cluster
TESTING_TYPE=cluster lein test-cluster
docker-compose -f docker-compose-cluster.yml down
rm -rf /tmp/ziggurat_kafka_cluster_data

coverage: setup
lein code-coverage
docker-compose down
1 change: 0 additions & 1 deletion bin/run_cluster_tests_in_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
set -ex

lein clean
mv -fv resources/config.test.{cluster.ci.edn,cluster.edn}
sudo make test-cluster
3 changes: 1 addition & 2 deletions bin/run_tests_in_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
set -ex

lein clean
mv -fv resources/config.test.{ci.edn,edn}
make test
make test
1 change: 0 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
:java-source-paths ["src/com"]
:aliases {"code-coverage" ["with-profile" "test" "cloverage" "--output" "coverage" "--lcov"]
"test-cluster" ["shell" "lein" "test"]}
:shell {:env {"TEST_CONFIG_FILE" "config.test.cluster.edn"}}
:aot [ziggurat.kafka-consumer.invalid-return-type-exception]
:profiles {:uberjar {:aot :all
:global-vars {*warn-on-reflection* true}
Expand Down
87 changes: 0 additions & 87 deletions resources/config.test.ci.edn

This file was deleted.

87 changes: 0 additions & 87 deletions resources/config.test.cluster.ci.edn

This file was deleted.

0 comments on commit c521b3e

Please sign in to comment.