-
Notifications
You must be signed in to change notification settings - Fork 286
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
Tracking issue for replace github.com/pingcap/check with github.com/stretchr/testify #2164
Comments
I have a question: Why we need a test framework? Can we just use the golang's built-in test framework? |
more functionality support i guess, ref https://github.com/stretchr/testify, also could discuss the option in https://internals.tidb.io/t/topic/141/6 with community, i think |
Off-line discussion: I support the use of testify, but the migration costs may be higher. Because there are a lot of tests. From @overvenus , we can use testify, because pingcap/check requires writing redundant templates. But we need to make sure that leak test is supported. |
Unnecessary. As done in pingcap/tidb and tikv/client-go, we can migrate testleak to goleak also, which requires less setups and is able to control (ignore) options per test (package). testleak is a toolkit build on pingcap/check and we don't have to maintain it if find a better replacement. |
Also I don't think this is a feature request. |
@ben1009 the next time you can comment this effort on the post or the issue of tidb so that we're aware of its happening. |
Agree. I think there are several potential contributors to work on this topic. Let's postpone this issue util there is actually someone ask for under this thread. We should avoid throwing ourselves into a situation that maintain two kinds of test cases for a long time. |
Looks like I can't convert task into issue. I assume contributor can create task and reply to this issue to create link, am I right? |
@sunxiaoguang yes. See also pingcap/tidb#27618 (comment) . |
@tisonkun hello, tisonkun, i am new to the ticdc group. We made offline discussion recently , and wanted to make the migration to testify and goleak step by step. What should we pay attention to the migration? Did you met something bad in the progress? |
@maxshuang I don't remember with an offline discussion though. What I can say it just go ahead to do it. Maybe start from some utility package like If you'd like to do it, I'll create a subtask and you can assign yourself by |
@maxshuang you can take a look at pingcap/tidb#26082 for best practices collected and previous discussions. |
Thank you all for your excellent work! |
Background
as described in the thread https://internals.tidb.io/t/topic/141/6
This is somewhat a subtask of pingcap/tidb#26022 that we make a decision that deprecating pingcap/check and adopting testify. Take a look at the tidb issue for more information.
After an offline discussion with @overvenus we think it is fine we make the same change on this repo and here is the tracking issue for the effort.
If you have any further concern, please comment below and reply will be in days.
We first write down a task list and since I have no time to continue the actual work, let's kick off when there is a contributor ask for starting the subtasks.
Join Forces
If you want to participant the movement, you can comment under this issue to acquire pkg or files to migrate. For example,
React will be in time and do the favor for you.
Also you can directly comment under any open issues below without assignee to require assignment.
You can take a look at pingcap/tidb#26375 as an example to do the migration.
Note
new unit-test
parallel
migrate kits
Progress
Considering test-infra migration is a long-term process,we need to divide the whole process into several phases. After that,
each pkgs will be classified into specific phase.
Subtasks
pkg/version
pkg #2919pkg/workerpool
pkg #2890pkg/quotes
pkg #2928pkg/regionspan
pkg #2927pkg/retry
pkg #2925pkg/scheduler
pkg #2923pkg/types
pkg #2921pkg/context
pkg #2859pkg/cyclic
pkg #2869pkg/cyclic/mark
pkg #2870pkg/errors
pkg #2871pkg/filter
pkg #2936pkg/flags
pkg #2935pkg/hash
pkg #2934pkg/httputil
pkg #2933pkg/notify
pkg #2930pkg/config
pkg #2825pkg/pipeline
pkg #2954pingcap/ticdc/pkg/util
#2879pkg/logutil
pkg #2932pkg/etcd
pkg #2878pkg/orchestrator
pkg #4200pkg/orchestrator/util
pkg #4878pkg/cmd
pkg #2912pkg/util
pkg #4879cdc/entry
pkg #2826cdc/processor
pkg #2902cdc/processor/pipeline
pkg #2903cdc/kv
pkg #2899cdc/model
pkg #2900cdc/owner
pkg #2901cdc/puller
pkg #2904cdc/puller/fronter
pkg #2905cdc/sorter
pkg #2906cdc/sink
pkg #2907cdc/sink/codec
pkg #2908cdc/sink/mq
pkg #2909cdc/sink/dispatcher
pkg #2910cdc/sink/producer/kafka
pkg #2911pkg/txnutil/gc
package #6107The text was updated successfully, but these errors were encountered: