Skip to content

Commit 71a9cff

Browse files
authored
feat(queue/consumer): add per-partition isolation integration tests (#111)
## Summary - Add subscriber-level isolation tests (`TestSubscriberPerPartitionIsolation`, `TestSubscriberPartitionOrderPreserved`) to the existing queue integration suite - Add a new consumer-level integration test suite (`test/integration/consumer/`) with `TestConsumerPerPartitionIsolation`, `TestConsumerPartitionOrdering`, and `TestConsumerMultiPartitionThroughput` - Add `integration-test-consumer` Makefile target ## Test plan `bazel test //test/integration/...`
1 parent 47a7b40 commit 71a9cff

6 files changed

Lines changed: 534 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ jobs:
113113
with:
114114
target: //test/integration/extension/storage/...
115115

116+
# ---------------------------------------------------------------------------
117+
# CORE TESTS
118+
# ---------------------------------------------------------------------------
119+
consumer-integration-test:
120+
name: Consumer Integration Test
121+
runs-on: ubuntu-latest
122+
steps:
123+
- uses: actions/checkout@v4
124+
- uses: ./.github/actions/setup
125+
- uses: ./.github/actions/run-bazel-test
126+
with:
127+
target: //test/integration/core/consumer/...
128+
116129
# ---------------------------------------------------------------------------
117130
# REQUIRED CHECKS GATE
118131
# ---------------------------------------------------------------------------
@@ -127,6 +140,7 @@ jobs:
127140
- counter-integration-test
128141
- queue-integration-test
129142
- storage-integration-test
143+
- consumer-integration-test
130144
steps:
131145
- name: All required checks passed
132146
run: |

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LOCAL_PROJECT = submitqueue
1313
# Set REPO_ROOT for docker-compose
1414
export REPO_ROOT := $(shell pwd)
1515

16-
.PHONY: build build-all-linux build-gateway-linux build-orchestrator-linux clean clean-proto deps e2e-test gazelle integration-test integration-test-extensions integration-test-gateway integration-test-orchestrator license-fix lint lint-license local-clean local-gateway-start local-gateway-stop local-init-schemas local-logs local-orchestrator-start local-orchestrator-stop local-ps local-restart local-start local-stop proto query-deps query-targets run-client-gateway run-client-orchestrator run-queue-admin test test-no-cache help
16+
.PHONY: build build-all-linux build-gateway-linux build-orchestrator-linux clean clean-proto deps e2e-test gazelle integration-test integration-test-consumer integration-test-extensions integration-test-gateway integration-test-orchestrator license-fix lint lint-license local-clean local-gateway-start local-gateway-stop local-init-schemas local-logs local-orchestrator-start local-orchestrator-stop local-ps local-restart local-start local-stop proto query-deps query-targets run-client-gateway run-client-orchestrator run-queue-admin test test-no-cache help
1717

1818

1919
build: ## Build all services and examples
@@ -71,6 +71,10 @@ integration-test: build-all-linux ## Run all integration tests (auto-builds bina
7171
@echo "Running all integration tests..."
7272
@$(BAZEL) test //test/integration/... --test_output=streamed
7373

74+
integration-test-consumer: ## Run Consumer integration tests
75+
@echo "Running Consumer integration tests..."
76+
@$(BAZEL) test //test/integration/core/consumer:consumer_test --test_output=streamed
77+
7478
integration-test-extensions: ## Run extension integration tests
7579
@echo "Running extension integration tests..."
7680
@$(BAZEL) test //test/integration/extension/... --test_output=streamed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
load("@rules_go//go:def.bzl", "go_test")
2+
3+
go_test(
4+
name = "consumer_test",
5+
srcs = ["consumer_test.go"],
6+
data = [
7+
"docker-compose.yml",
8+
"//extension/queue/mysql/schema",
9+
],
10+
tags = ["integration"],
11+
deps = [
12+
"//core/consumer",
13+
"//entity/queue",
14+
"//extension/queue",
15+
"//extension/queue/mysql",
16+
"//test/testutil",
17+
"@com_github_go_sql_driver_mysql//:mysql",
18+
"@com_github_stretchr_testify//require",
19+
"@com_github_stretchr_testify//suite",
20+
"@com_github_uber_go_tally_v4//:tally",
21+
"@org_uber_go_zap//zaptest",
22+
],
23+
)

0 commit comments

Comments
 (0)