-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
===========================================
Coverage 58.8389% 58.8389%
===========================================
Files 123 123
Lines 14487 14487
===========================================
Hits 8524 8524
Misses 5098 5098
Partials 865 865 |
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.
Note the integration test runs in parallel, and new added test case is not listed in CI, so remember to add the TEST_NAME of new added test case to file others_integration.txt in a newline.
Newly added integration tests are not tested now
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-all-tests |
@amyangfei have already add new test in others_integration.txt |
loader/db.go
Outdated
|
||
failpoint.Inject("LoadExecCreateTableFailed", func() { | ||
if i == 0 && len(sqls) == 1 && strings.Contains(sqls[0], "CREATE TABLE") { | ||
err = domain.ErrInfoSchemaChanged |
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 only inject ErrInfoSchemaChanged
error here? can we support to inject custom error?
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.
use error code, 3b35795
tests/load_interrupt/run.sh
Outdated
@@ -59,7 +59,8 @@ function run() { | |||
check_row_count 1 | |||
check_row_count 2 | |||
|
|||
export GO_FAILPOINTS='' | |||
# only failed at the first time, will retry later and success | |||
export GO_FAILPOINTS='github.com/pingcap/dm/loader/LoadExecCreateTableFailed=return(true)' |
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.
how to check it?
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.
add log check
# LoadExecCreateTableFailed error return twice
err_cnt=`grep LoadExecCreateTableFailed $WORK_DIR/worker1/log/dm-worker.log | wc -l`
if [ $err_cnt -ne 2 ]; then
echo "error LoadExecCreateTableFailed's count is not 2"
exit 2
fi
Good Job! |
/run-all-tests |
@GregoryIan @amyangfei PTAL again |
tests/_utils/test_prepare
Outdated
@@ -25,6 +25,15 @@ function cleanup2() { | |||
pkill -hup dm-tracer.test 2>/dev/null || true | |||
} | |||
|
|||
function cleanup() { |
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'm afraid that cleanup
cleans more data then what we need, such as it cleans running dir after a test case finished, which is not friendly for error inspection.
What about moving wait_process_exit
to cleanup2
, and using cleanup1
or cleanup2
when we need. Besides we can use a better name then cleanup1
, cleanup2
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.
update in 9d7936a
Co-Authored-By: amyangfei <amyangfei@gmail.com>
Co-Authored-By: amyangfei <amyangfei@gmail.com>
/run-all-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.
LGTM
@GregoryIan PTAL again |
/run-all-tests |
/run-all-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.
LGTM
What problem does this PR solve?
add some failpoint about db operation, and add integration test
issue: https://internal.pingcap.net/jira/browse/TOOL-1394
What is changed and how it works?
Check List
Tests