-
Notifications
You must be signed in to change notification settings - Fork 26
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
[to #295] Speed up cdc integrated tests #294
Conversation
Signed-off-by: pingyu <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #294 +/- ##
================================================
- Coverage 61.0519% 54.3904% -6.6616%
================================================
Files 240 238 -2
Lines 20286 20294 +8
================================================
- Hits 12385 11038 -1347
- Misses 6780 8379 +1599
+ Partials 1121 877 -244
*This pull request uses carry forward flags. Click here to find out more.
|
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
Mark: And this may be the reason of "restart" argument of |
Mark:
|
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
Signed-off-by: pingyu <[email protected]>
/verify |
Mark:
log: https://ci.pingcap.net/blue/organizations/jenkins/common-check/detail/common-check/112072/pipeline/ |
/verify |
@haojinming @zeminzhou PTAL, thanks~ |
At the end of
|
RUN make integration_test_build kafka_consumer cdc | ||
COPY --from=downloader /root/download/bin/* ./bin/ | ||
RUN make integration_test_build cdc | ||
COPY --from=downloader /root/download/bin/* ./scripts/bin/ |
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.
What to copy?
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.
The tidb-server
, tikv-server
, etc., which are downloaded by ./scripts/download-integration-test-binaries.sh
.
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.
Now make integration_test_build
will not download these binaries, we should call make prepare_test_binaries
to download these binaries.
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.
The binaries are prepared at the beginning. See line 8 here.
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.
Got it
# We always need to clean before we build, please don't adjust its order. | ||
RUN make clean | ||
RUN make integration_test_build kafka_consumer cdc | ||
COPY --from=downloader /root/download/bin/* ./bin/ | ||
RUN make integration_test_build cdc |
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.
remove cdc?
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.
The tikv-cdc
is necessary as test cases using $(tikv-cdc cli xxx)
?
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.
I mean make integration_test_build cdc
-> make integration_test_build
, because make integration_test_build
will build tikv-cdc.test
& tikv-cdc
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.
Oh, I see.
Fixed, PTAL~
cdc/tests/up.sh
Outdated
echo "Usage: $0 [OPTIONS]" | ||
echo "OPTIONS:" | ||
echo " --help Display this message" | ||
echo " --tag (TAG) Specify images tag used in br tests" |
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.
br
-> cdc
?
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.
Fixed. PTAL~
echo "Run \"make integration_test\" to start integrated tests" | ||
# shellcheck disable=SC2068 | ||
exec docker run -it \ | ||
-v "$host_tmp":/tmp/tikv_cdc_test \ |
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.
Why binds mount a volume?
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.
To write logs to host directory, for addressing issues. Otherwise after exit the container, all logs gone.
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.
Get it, that's good idea!
Signed-off-by: pingyu <[email protected]>
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.
LGTM
Signed-off-by: pingyu <[email protected]>
/verify |
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.
LGTM~
* speed up integrated tests Signed-off-by: pingyu <[email protected]> * wip Signed-off-by: pingyu <[email protected]> * update release version; add usage comment for up.sh Signed-off-by: pingyu <[email protected]> * print more debug info Signed-off-by: pingyu <[email protected]> * fix fmt Signed-off-by: pingyu <[email protected]> * add shellcheck Signed-off-by: pingyu <[email protected]> * fix CI error Signed-off-by: pingyu <[email protected]> * remove "br" in comment Signed-off-by: pingyu <[email protected]> * remove useless cdc target Signed-off-by: pingyu <[email protected]> Signed-off-by: pingyu <[email protected]> Signed-off-by: zeminzhou <[email protected]>
* add a integration test case for disk full Signed-off-by: zeminzhou <[email protected]> * [to #295] Speed up cdc integrated tests (#294) * speed up integrated tests Signed-off-by: pingyu <[email protected]> * wip Signed-off-by: pingyu <[email protected]> * update release version; add usage comment for up.sh Signed-off-by: pingyu <[email protected]> * print more debug info Signed-off-by: pingyu <[email protected]> * fix fmt Signed-off-by: pingyu <[email protected]> * add shellcheck Signed-off-by: pingyu <[email protected]> * fix CI error Signed-off-by: pingyu <[email protected]> * remove "br" in comment Signed-off-by: pingyu <[email protected]> * remove useless cdc target Signed-off-by: pingyu <[email protected]> Signed-off-by: pingyu <[email protected]> Signed-off-by: zeminzhou <[email protected]> * fix check Signed-off-by: zeminzhou <[email protected]> * remove unused code & remove modified it cases (#301) Signed-off-by: zeminzhou <[email protected]> Signed-off-by: zeminzhou <[email protected]> Co-authored-by: Ping Yu <[email protected]> Signed-off-by: zeminzhou <[email protected]> * address comment Signed-off-by: zeminzhou <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> * Update cdc/tests/integration_tests/disk_full/run.sh Co-authored-by: Ping Yu <[email protected]> Signed-off-by: zeminzhou <[email protected]> * fix stop_downstream Signed-off-by: zeminzhou <[email protected]> * fix check Signed-off-by: zeminzhou <[email protected]> * fix it Signed-off-by: zeminzhou <[email protected]> * fix disk full Signed-off-by: zeminzhou <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> Signed-off-by: zeminzhou <[email protected]> Signed-off-by: pingyu <[email protected]> Co-authored-by: Ping Yu <[email protected]> Co-authored-by: Ping Yu <[email protected]>
Signed-off-by: pingyu [email protected]
What problem does this PR solve?
Issue Number: close #295, #296
Problem Description: Speed up integrated tests
What is changed and how does it work?
a. Disable checking TiDB status (but add checking TiKV status).
b. Shorten some during of sleep.
integrated-test.Dockfile
.tests/up.sh
to run integrated tests in a isolated environment.1.1.0-master
.make tools/bin/shellcheck
andtools/bin/shellcheck xxx
to check modified scripts in our PRs.make shellcheck
should be enabled in CI later.Code changes
Check List for Tests
This PR has been tested by at least one of the following methods:
Side effects
Related changes