dm icon indicating copy to clipboard operation
dm copied to clipboard

increase DM unit test/integration test code coverage

Open amyangfei opened this issue 6 years ago • 1 comments

Feature Request

Describe the feature you'd like:

We want to cover most import logic path in DM and increase code coverage as high as possible

P0, P1, P2 represents the priority, P0 has the highest priority, P2 has the lowest priority. P0 > P1 > P2

Teachability Strategy:

We want to finish this task in several steps

  • add tests to cover most import logic path, tests not included in DM are listed as follows

    • [x] P1: online DDL test dm#84
    • [ ] P1: online DDL test in non sharding mode
    • [x] P1: relay log correctness test P0 dm#91
    • [ ] P1: master slave switch test
      • [ ] P1: master slave switch with VIP https://github.com/pingcap/dm/pull/1364
      • [ ] P1: master slave switch with different upstream IP/host
      • [ ] P1: upstream change server_uuid/server_id, which is similar to master slave switch with VIP
    • [x] P2: dmctl API, including many APIs and also some error handling scenario, such as sql-skip/sql-replace, sharding DDL error handling etc. dm#135
    • [x] P2: syncer heartbeat dm#86
    • [ ] P2: metric API
    • [x] P2: periodicity status, such as syncer PrintStatus, loader PrintStatus dm#127
    • [x] P1: test increment mode task dm#112
    • [ ] P1: test task config update
    • [x] P0: detect casuality conflict and generate flush job test case dm#198
    • [ ] P0: remove mysql dependence from unit test dm#209, dm#215, dm#226
  • add more failpoint inject

    • [x] P0: test drop schema, drop table, truncate table, create database, create table in sharding mode dm#123
    • [x] P1: inject some db operation error, for example, connection timeout, table schema information has changed dm#206
    • [ ] P2: test load unit auto .name suffix compatibility
    • [ ] P1: test load/syncer unit pause and resume
    • [ ] P1: test syncer unit get Event timeout
    • [ ] P0: test unexpected exit before flush checkpoint (with and without is-sharding)
    • [ ] P0: cover more logic in sequence sharding
  • increase code coverage mainly based on coverage of each source file

amyangfei avatar Mar 08 '19 08:03 amyangfei

integration test not stable case

  • [ ] https://internal.pingcap.net/idc-jenkins/blue/organizations/jenkins/dm_ghpr_test/detail/dm_ghpr_test/1810/pipeline

amyangfei avatar Aug 08 '19 03:08 amyangfei