-
Notifications
You must be signed in to change notification settings - Fork 4.1k
ci(linux): bring up redis-server and mysql-server for unittests #3323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a6e885b
c6a03f5
4ed6c48
815d086
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,6 +196,12 @@ jobs: | |
| cat config.mk | ||
| cd test | ||
| make -j ${{env.proc_num}} | ||
| - name: install redis-server and mysql-server | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y redis-server mysql-server | ||
| redis-server --version | ||
| mysqld --version | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected. |
||
| - name: run tests | ||
| run: | | ||
| cd test | ||
|
|
@@ -214,10 +220,19 @@ jobs: | |
| cat config.mk | ||
| cd test | ||
| make NEED_GPERFTOOLS=0 -j ${{env.proc_num}} | ||
| - name: install redis-server and mysql-server | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y redis-server mysql-server | ||
| redis-server --version | ||
| mysqld --version | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as the |
||
| - name: run tests | ||
| run: | | ||
| cd test | ||
| sh ./run_tests.sh | ||
| # brpc_redis_unittest forks a real redis-server and waits a fixed 50ms before | ||
| # connecting; under ASan redis starts too slowly, so the redis client tests are | ||
| # flaky here (connection refused). Skip them in ASan; they run in clang-unittest. | ||
| GTEST_FILTER='-RedisTest.*' sh ./run_tests.sh | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applied. The ASan filter now excludes only the five client tests that connect to the forked redis-server — |
||
|
|
||
| clang-unittest-bazel-with-babylon-and-new-pb: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do clang-unittest-bazel-with-babylon-and-new-pb, clang-unittest-with-bazel and gcc-unittest-with-bazel also require Redis server to be installed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's necessary.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — addressed in the latest commit. The Redis integration tests now genuinely fork |
||
| runs-on: ubuntu-22.04 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can refer to install-essential-dependencies and add an action to install the Redis server and MySQL server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done — moved the redis-server / mysql-server install into the
install-essential-dependenciescomposite action and removed the per-job install steps fromclang-unittestandclang-unittest-asan. Every job that pulls in those dependencies now brings up both servers. Re-validated on my fork: all Linux jobs green (https://github.com/rajvarun77/brpc/actions/runs/26858989158).