Skip to content

Commit

Permalink
remove xdc and only keep ndc
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Sep 22, 2020
1 parent 61feb36 commit e8256f7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 81 deletions.
51 changes: 3 additions & 48 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,6 @@ steps:
run: integration-test-cassandra
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration xdc test with cassandra"
agents:
queue: "workers"
docker: "*"
command: "make cover_xdc_profile"
artifact_paths:
- "build/coverage/*.out"
retry:
automatic:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-cassandra
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration ndc test with cassandra"
agents:
queue: "workers"
Expand All @@ -58,7 +43,7 @@ steps:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-cassandra
run: integration-test-ndc-cassandra
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration test with mysql"
Expand All @@ -76,21 +61,6 @@ steps:
run: integration-test-mysql
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration xdc test with mysql"
agents:
queue: "workers"
docker: "*"
command: "make cover_xdc_profile"
artifact_paths:
- "build/coverage/*.out"
retry:
automatic:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-mysql
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration ndc test with mysql"
agents:
queue: "workers"
Expand All @@ -103,7 +73,7 @@ steps:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-mysql
run: integration-test-ndc-mysql
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration test with postgres"
Expand All @@ -121,21 +91,6 @@ steps:
run: integration-test-postgres
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration xdc test with postgres"
agents:
queue: "workers"
docker: "*"
command: "make cover_xdc_profile"
artifact_paths:
- "build/coverage/*.out"
retry:
automatic:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-postgres
config: docker/buildkite/docker-compose.yml

- label: ":golang: integration ndc test with postgres"
agents:
queue: "workers"
Expand All @@ -148,7 +103,7 @@ steps:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-xdc-postgres
run: integration-test-ndc-postgres
config: docker/buildkite/docker-compose.yml

- wait
Expand Down
20 changes: 1 addition & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ INTEG_COVER_FILE_CASS := $(COVER_ROOT)/integ_cassandra__cover.out
INTEG_COVER_FILE_MYSQL := $(COVER_ROOT)/integ_sql_mysql_cover.out
INTEG_COVER_FILE_POSTGRES := $(COVER_ROOT)/integ_sql_postgres_cover.out

INTEG_XDC_COVER_FILE := $(COVER_ROOT)/integ_xdc_$(PERSISTENCE_TYPE)_$(PERSISTENCE_PLUGIN)_cover.out
INTEG_XDC_COVER_FILE_CASS := $(COVER_ROOT)/integ_xdc_cassandra__cover.out
INTEG_XDC_COVER_FILE_MYSQL := $(COVER_ROOT)/integ_xdc_sql_mysql_cover.out
INTEG_XDC_COVER_FILE_POSTGRES := $(COVER_ROOT)/integ_xdc_sql_postgres_cover.out

INTEG_NDC_COVER_FILE := $(COVER_ROOT)/integ_ndc_$(PERSISTENCE_TYPE)_$(PERSISTENCE_PLUGIN)_cover.out
INTEG_NDC_COVER_FILE_CASS := $(COVER_ROOT)/integ_ndc_cassandra__cover.out
INTEG_NDC_COVER_FILE_MYSQL := $(COVER_ROOT)/integ_ndc_sql_mysql_cover.out
Expand Down Expand Up @@ -220,16 +215,6 @@ cover_integration_profile: clean bins_nothrift
@time go test $(INTEG_TEST_ROOT) $(TEST_ARG) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -sqlPluginName=$(PERSISTENCE_PLUGIN) $(GOCOVERPKG_ARG) -coverprofile=$(BUILD)/$(INTEG_TEST_DIR)/coverage.out || exit 1;
@cat $(BUILD)/$(INTEG_TEST_DIR)/coverage.out | grep -v "^mode: \w\+" >> $(INTEG_COVER_FILE)

cover_xdc_profile: clean bins_nothrift
@mkdir -p $(BUILD)
@mkdir -p $(COVER_ROOT)
@echo "mode: atomic" > $(INTEG_XDC_COVER_FILE)

@echo Running integration test for cross dc with $(PERSISTENCE_TYPE) $(PERSISTENCE_PLUGIN)
@mkdir -p $(BUILD)/$(INTEG_TEST_XDC_DIR)
@time go test -v -timeout $(TEST_TIMEOUT) $(INTEG_TEST_XDC_ROOT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -sqlPluginName=$(PERSISTENCE_PLUGIN) $(GOCOVERPKG_ARG) -coverprofile=$(BUILD)/$(INTEG_TEST_XDC_DIR)/coverage.out || exit 1;
@cat $(BUILD)/$(INTEG_TEST_XDC_DIR)/coverage.out | grep -v "^mode: \w\+" | grep -v "mode: set" >> $(INTEG_XDC_COVER_FILE)

cover_ndc_profile: clean bins_nothrift
@mkdir -p $(BUILD)
@mkdir -p $(COVER_ROOT)
Expand All @@ -240,15 +225,12 @@ cover_ndc_profile: clean bins_nothrift
@time go test -v -timeout $(TEST_TIMEOUT) $(INTEG_TEST_NDC_ROOT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -sqlPluginName=$(PERSISTENCE_PLUGIN) $(GOCOVERPKG_ARG) -coverprofile=$(BUILD)/$(INTEG_TEST_NDC_DIR)/coverage.out -count=$(TEST_RUN_COUNT) || exit 1;
@cat $(BUILD)/$(INTEG_TEST_NDC_DIR)/coverage.out | grep -v "^mode: \w\+" | grep -v "mode: set" >> $(INTEG_NDC_COVER_FILE)

$(COVER_ROOT)/cover.out: $(UNIT_COVER_FILE) $(INTEG_COVER_FILE_CASS) $(INTEG_COVER_FILE_MYSQL) $(INTEG_COVER_FILE_POSTGRES) $(INTEG_XDC_COVER_FILE_CASS) $(INTEG_XDC_COVER_FILE_MYSQL) $(INTEG_XDC_COVER_FILE_POSTGRES) $(INTEG_NDC_COVER_FILE_CASS) $(INTEG_NDC_COVER_FILE_MYSQL) $(INTEG_NDC_COVER_FILE_POSTGRES)
$(COVER_ROOT)/cover.out: $(UNIT_COVER_FILE) $(INTEG_COVER_FILE_CASS) $(INTEG_COVER_FILE_MYSQL) $(INTEG_COVER_FILE_POSTGRES) $(INTEG_NDC_COVER_FILE_CASS) $(INTEG_NDC_COVER_FILE_MYSQL) $(INTEG_NDC_COVER_FILE_POSTGRES)
@echo "mode: atomic" > $(COVER_ROOT)/cover.out
cat $(UNIT_COVER_FILE) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_XDC_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_XDC_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_XDC_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_NDC_COVER_FILE_CASS) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_NDC_COVER_FILE_MYSQL) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
cat $(INTEG_NDC_COVER_FILE_POSTGRES) | grep -v "^mode: \w\+" | grep -vP ".gen|[Mm]ock[s]?" >> $(COVER_ROOT)/cover.out
Expand Down
4 changes: 2 additions & 2 deletions docker/buildkite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ docker-compose -f docker/buildkite/docker-compose-local.yml build integration-te

cross DC integration tests:
```bash
docker-compose -f docker/buildkite/docker-compose-local.yml build integration-test-xdc-cassandra
docker-compose -f docker/buildkite/docker-compose-local.yml build integration-test-ndc-cassandra
```

Run the integration tests:
Expand All @@ -40,7 +40,7 @@ docker-compose -f docker/buildkite/docker-compose-local.yml run integration-test

cross DC integration tests:
```bash
docker-compose -f docker/buildkite/docker-compose-local.yml run integration-test-xdc-cassandra
docker-compose -f docker/buildkite/docker-compose-local.yml run integration-test-ndc-cassandra
```

Note that BuildKite will run basically the same commands.
Expand Down
12 changes: 6 additions & 6 deletions docker/buildkite/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ services:
aliases:
- integration-test

integration-test-xdc-cassandra:
integration-test-ndc-cassandra:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
Expand All @@ -235,7 +235,7 @@ services:
- -e
- -c
- |
make cover_xdc_profile
make cover_ndc_profile
ports:
- "7933:7933"
- "7934:7934"
Expand All @@ -255,9 +255,9 @@ services:
networks:
services-network:
aliases:
- integration-test-xdc
- integration-test-ndc

integration-test-xdc-mysql:
integration-test-ndc-mysql:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
Expand All @@ -266,7 +266,7 @@ services:
- -e
- -c
- |
make cover_xdc_profile
make cover_ndc_profile
ports:
- "7933:7933"
- "7934:7934"
Expand All @@ -287,7 +287,7 @@ services:
networks:
services-network:
aliases:
- integration-test-xdc
- integration-test-ndc

networks:
services-network:
Expand Down
12 changes: 6 additions & 6 deletions docker/buildkite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ services:
aliases:
- integration-test

integration-test-xdc-cassandra:
integration-test-ndc-cassandra:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
Expand All @@ -186,9 +186,9 @@ services:
networks:
services-network:
aliases:
- integration-test-xdc
- integration-test-ndc

integration-test-xdc-mysql:
integration-test-ndc-mysql:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
Expand All @@ -213,9 +213,9 @@ services:
networks:
services-network:
aliases:
- integration-test-xdc
- integration-test-ndc

integration-test-xdc-postgres:
integration-test-ndc-postgres:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
Expand All @@ -240,7 +240,7 @@ services:
networks:
services-network:
aliases:
- integration-test-xdc
- integration-test-ndc

coverage-report:
build:
Expand Down

0 comments on commit e8256f7

Please sign in to comment.