Skip to content

ci: run forked-server integration tests under bazel (redis)#3

Open
rajvarun77 wants to merge 4 commits into
masterfrom
ci-bazel-redis-integration
Open

ci: run forked-server integration tests under bazel (redis)#3
rajvarun77 wants to merge 4 commits into
masterfrom
ci-bazel-redis-integration

Conversation

@rajvarun77

Copy link
Copy Markdown
Owner

Staging PR to exercise CI. Makes brpc_redis_unittest's integration cases truly run under bazel (install redis/mysql via shared action + external/local tags) and adds a bazel-asan job that skips the 5 flaky cases. Will fold into apache#3323 once green.

rajvarun77 and others added 4 commits June 1, 2026 16:22
The clang-unittest and clang-unittest-asan jobs run the full unit test
suite via test/run_tests.sh, which includes backend integration tests
(e.g. brpc_redis_unittest) that fork a real server when its binary is
present and otherwise silently short-circuit to a passing result. Since
CI never installed those servers, the redis backend tests reported
PASSED while doing nothing (7 of 14 RedisTest cases skip-as-pass).

Install redis-server and mysql-server before running the tests in both
unittest jobs so these backend tests execute against a live server. The
binaries are added only in the unittest jobs, not in the shared
install-essential-dependencies action used by compile-only jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brpc_redis_unittest forks a real redis-server and waits a fixed 50ms before
connecting; under ASan redis starts too slowly, causing flaky connection-refused.
Skip RedisTest.* in the ASan job only (still covered by clang-unittest).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-dependencies

Move the redis-server/mysql-server install out of the individual
clang-unittest and clang-unittest-asan jobs and into the shared
install-essential-dependencies composite action, so every job that
installs dependencies has the servers available (and the unittest jobs
no longer carry a bespoke install step).

Under ASan the redis integration tests (sanity, keys_with_spaces,
incr_and_decr, by_components, auth) fork a real redis-server and connect
after a fixed 50ms wait; redis starts too slowly there and they flake
with connection refused. Filter just those out under ASan -- the redis
codec/server tests still run, and the full suite runs in clang-unittest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The bazel unittest jobs ran //test/... without redis-server/mysql-server
installed, so brpc_redis_unittest forked nothing and its integration cases
(sanity/keys_with_spaces/incr_and_decr/by_components/auth) early-returned as
passes -- green but vacuous.

- Install redis-server/mysql-server in the (non-ASan) bazel test jobs via the
  shared install-essential-dependencies action (the same one the make jobs
  use), so the servers are on PATH for the forked tests.
- Tag brpc_redis_unittest "external" + "local" so bazel always re-runs it
  (never serves a cached skip) and runs it outside the sandbox where the
  PATH-located redis-server is visible and loopback works. Threaded through
  generate_unittests via a new per_test_tags arg.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rajvarun77 rajvarun77 force-pushed the ci-bazel-redis-integration branch from 7ccd35b to 815d086 Compare June 3, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant