You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/10/22 06:36:43 UTC

[GitHub] [couchdb] jjrodrig commented on a change in pull request #3189: Split and prioritize integration tests execution

jjrodrig commented on a change in pull request #3189:
URL: https://github.com/apache/couchdb/pull/3189#discussion_r509906627



##########
File path: Makefile
##########
@@ -233,44 +233,53 @@ python-black-update: .venv/bin/black
 .PHONY: elixir
 elixir: export MIX_ENV=integration
 elixir: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
-elixir: elixir-init elixir-check-formatted elixir-credo devclean
-	@dev/run "$(TEST_OPTS)" \
-		-a adm:pass \
-		-n 1 \
+elixir: elixir-init elixir-check-formatted elixir-credo elixir-single-node elixir-performance elixir-degraded-cluster elixir-cluster devclean
+
+.PHONY: elixir-single-node
+elixir-single-node: export MIX_ENV=integration
+elixir-single-node: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-single-node: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 1 \
 		--enable-erlang-views \
+		--erlang-config rel/files/eunit.config \
 		--locald-config test/elixir/test/config/test-config.ini \
+		--no-eval 'mix test --trace --only kind:single_node $(EXUNIT_OPTS)'
+
+.PHONY: elixir-performance
+elixir-performance: export MIX_ENV=integration
+elixir-performance: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-performance: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 1 \
+		--enable-erlang-views \
 		--erlang-config rel/files/eunit.config \
-		--no-eval 'mix test --trace --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+		--locald-config test/elixir/test/config/test-config.ini \
+		--no-eval 'mix test --trace --only kind:performance $(EXUNIT_OPTS)'
 
-.PHONY: elixir-only
-elixir-only: devclean
-	@dev/run "$(TEST_OPTS)" \
-		-a adm:pass \
-		-n 1 \
+.PHONY: elixir-cluster
+elixir-cluster: export MIX_ENV=integration
+elixir-cluster: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-cluster: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 3 \
 		--enable-erlang-views \
+		--erlang-config rel/files/eunit.config \
 		--locald-config test/elixir/test/config/test-config.ini \
+		--no-eval 'mix test --trace --only kind:cluster $(EXUNIT_OPTS)'
+
+.PHONY: elixir-degraded-cluster
+elixir-degraded-cluster: export MIX_ENV=integration
+elixir-degraded-cluster: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-degraded-cluster: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 1 \

Review comment:
       @dottorblaster  this configuration is the same that the elixir-single-node option. To define a degraded cluster it is required to startup multiple nodes and then stop some of them. I included this option in the run script for the without_quorum testing.
   I think that we should keep these options to launch a degraded cluster
   ```
    @dev/run -n 3  --degrade-cluster 2  ...
   ```
   

##########
File path: Makefile
##########
@@ -233,44 +233,53 @@ python-black-update: .venv/bin/black
 .PHONY: elixir
 elixir: export MIX_ENV=integration
 elixir: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
-elixir: elixir-init elixir-check-formatted elixir-credo devclean
-	@dev/run "$(TEST_OPTS)" \
-		-a adm:pass \
-		-n 1 \
+elixir: elixir-init elixir-check-formatted elixir-credo elixir-single-node elixir-performance elixir-degraded-cluster elixir-cluster devclean
+
+.PHONY: elixir-single-node
+elixir-single-node: export MIX_ENV=integration
+elixir-single-node: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-single-node: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 1 \
 		--enable-erlang-views \
+		--erlang-config rel/files/eunit.config \
 		--locald-config test/elixir/test/config/test-config.ini \
+		--no-eval 'mix test --trace --only kind:single_node $(EXUNIT_OPTS)'
+
+.PHONY: elixir-performance
+elixir-performance: export MIX_ENV=integration
+elixir-performance: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
+elixir-performance: devclean
+	@dev/run "$(TEST_OPTS)" -a adm:pass -n 1 \
+		--enable-erlang-views \
 		--erlang-config rel/files/eunit.config \
-		--no-eval 'mix test --trace --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+		--locald-config test/elixir/test/config/test-config.ini \
+		--no-eval 'mix test --trace --only kind:performance $(EXUNIT_OPTS)'
 
-.PHONY: elixir-only
-elixir-only: devclean
-	@dev/run "$(TEST_OPTS)" \
-		-a adm:pass \
-		-n 1 \
+.PHONY: elixir-cluster

Review comment:
       I think that this is not enough for running the with_quorum tests. These tests require a degraded cluster with quorum as some of the test are checking the quorum override behaviour of some operations. We need a degraded cluster that keeps the quorum for this.
   ```
    @dev/run -n 3  --degrade-cluster 1  ...
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org