kitex icon indicating copy to clipboard operation
kitex copied to clipboard

Request help: Supplementary of Unit Tests

Open YangruiEmma opened this issue 2 years ago β€’ 28 comments

We hope more developers join CloudWeGo. This is a task issue that needs your help.

Issue Description Write Unit Tests for some modules of Kitex, we mainly focus on Statement Coverage. The packages are shown below, you can choose and reply by comment. Before you pick the task, please comply with the following requirements:

  • The Unit Test you add must be meaningful.
    • It is used to verify the correctness of code logic.
    • It is forbidden to add a test only for the purpose of coverage but without logical meaning.
  • It is suggested to add comments with clear descriptions for each unit test.
  • Every unit test must have assertions.
  • Don't check code logic by print.

Packages

Current Coverages v0.2.0.


  • [x] kitex/client: Current 52.7%(Overall 59%), Target 80%, DONE by @authorixy
  • [x] kitex/server: Current 73%, Target 80%, DONE by @baiyutang
  • [x] kitex/pkg/klog: Current 0%(Overall 33.3%), Target 80%, DONE by @dongzeXD
  • [x] kitex/pkg/retry: Current 34.9%, Target 80%, DONE by @JZK-Keven
  • [x] kitex/pkg/transmeta: Current 27.2%, Target 80%, DONE by @ag9920
  • [x] kitex/pkg/utils: Current 70.5%, Target 80%, DONE by @bodhisatan
  • [ ] kitex/pkg/remote/codec: Current 58.5%, Target 80%, TODO by @mxdblcf
  • [x] kitex/pkg/remote/trans/netpoll: Current 39.5%(Overall 56%), Target 80%, DONE by @Jacob953
  • [x] kitex/pkg/remote/trans/netpollmux: Current 42.3%, Target 80%, DONE by @debug-LiXiwen
  • [x] kitex/pkg/remote/trans/nhttp2: Current 0%, Target 80%, DONE by @HeyJavaBean
  • [x] kitex/pkg/remote/bound: Current 0%(Overall 57.9%), Target 80%, DONE By @Midugo
  • [x] kitex/pkg/protocol: Current 0%, Target 80%, DONE by @Lvnszn
  • [x] kitex/pkg/generic: Current 59%, Target 80%, DONE By @LoveScotty
  • [x] kitex/pkg/remote/remotecli: Current 45.7%(Overall 73.4%), Target 80%,DONE by @debug-LiXiwen

YangruiEmma avatar Mar 14 '22 13:03 YangruiEmma

Hi, I want to choose module "kitex/pkg/remote/trans/nhttp2" πŸ™ŒπŸ»

HeyJavaBean avatar Mar 14 '22 14:03 HeyJavaBean

Hi, I want to choose module " kitex/client" πŸ™ŒπŸ»

li-jin-gou avatar Mar 15 '22 02:03 li-jin-gou

Thank you, @li-jin-gou and @HeyJavaBean ! I have updated this issue to mark your TODO.

YangruiEmma avatar Mar 15 '22 02:03 YangruiEmma

Hi, I want to choose module "kitex/pkg/utils" πŸ™ŒπŸ»

bodhisatan avatar Mar 15 '22 06:03 bodhisatan

Hi, I want to choose module "kitex/pkg/retry" πŸ™ŒπŸ»

JZK-Keven avatar Mar 15 '22 06:03 JZK-Keven

Hi, I want to choose module "kitex/pkg/remote/trans/netpollmux" πŸ™ŒπŸ»

debug-LiXiwen avatar Mar 15 '22 06:03 debug-LiXiwen

Thanks @bodhisatan @JZK-Keven @debug-LiXiwen . We have updated this issue to mark your TODO ; )

YangruiEmma avatar Mar 15 '22 06:03 YangruiEmma

kitex/server πŸ™ŒπŸ»

baiyutang avatar Mar 15 '22 07:03 baiyutang

kitex/server kitex/pkg/klog πŸ™ŒπŸ»

Claim one task at a time please, you may claim another one when you finish the previous one. @baiyutang

GuangmingLuo avatar Mar 15 '22 07:03 GuangmingLuo

Hi, I want to choose module "kitex/pkg/klog" πŸ™ŒπŸ»

dongzeXD avatar Mar 16 '22 03:03 dongzeXD

Thanks @baiyutang @dongzeXD . We have updated this issue to mark your TODO ; )

YangruiEmma avatar Mar 16 '22 03:03 YangruiEmma

Hi, I want to choose module "kitex/pkg/remote/trans/netpoll" πŸ™ŒπŸ»

Jacob953 avatar Mar 21 '22 07:03 Jacob953

Thanks @Jacob953 , I have updated this issue to mark your TODO ; )

YangruiEmma avatar Mar 21 '22 07:03 YangruiEmma

Hi, I want to choose module "kitex/pkg/remote/codec"

mxdblcf avatar Mar 22 '22 02:03 mxdblcf

Hi, I want to choose module "kitex/pkg/transmeta"

ag9920 avatar Mar 22 '22 03:03 ag9920

Thanks @mxdblcf and @ag9920 , I have updated this issue to mark your TODO ; )

YangruiEmma avatar Mar 22 '22 03:03 YangruiEmma

Hi, I want to choose module "kitex/pkg/remote/bound"

Midugo avatar Mar 28 '22 03:03 Midugo

Thanks @Midugo , I have updated this issue to mark your TODO ; )

YangruiEmma avatar Mar 28 '22 04:03 YangruiEmma

Hi, I want to choose another module "kitex/pkg/protocal" to fix ut of thrift serialization.

Midugo avatar Mar 30 '22 06:03 Midugo

Hi, I want to choose another module "kitex/pkg/protocal" to fix ut of thrift serialization.

fine, I have updated, Thanks again @Midugo

YangruiEmma avatar Mar 30 '22 06:03 YangruiEmma

Hi,I want to choose module β€œ kitex/pkg/generic”

LoveScotty avatar Apr 03 '22 05:04 LoveScotty

Thanks, I have updated the issue. @LoveScotty

GuangmingLuo avatar Apr 04 '22 02:04 GuangmingLuo

@HeyJavaBean @li-jin-gou @Jacob953 @mxdblcf @ag9920 hi guys, please submit PR as soon as possible, otherwise the tasks may be invalid.

GuangmingLuo avatar Apr 12 '22 02:04 GuangmingLuo

Sorry about the other important things before, I will finish as soon as possible. @GuangmingLuo

Jacob953 avatar Apr 12 '22 02:04 Jacob953

@HeyJavaBean @li-jin-gou @Jacob953 @mxdblcf @ag9920 hi guys, please submit PR as soon as possible, otherwise the tasks may be invalid.

@GuangmingLuo Hi, sorry for the late reply, the PR for pkg/transmeta was merged today, the coverage for transmeta was promoted from 27.2% to 90.1%.

ag9920 avatar Apr 28 '22 04:04 ag9920

hi, I want to choose module "kitex/pkg/remote/remotecli"

debug-LiXiwen avatar Apr 29 '22 05:04 debug-LiXiwen

hi, I want to choose module "kitex/pkg/remote/remotecli"

Thanks, I have updated the issue. @debug-LiXiwen

GuangmingLuo avatar Apr 29 '22 07:04 GuangmingLuo

hi, I want to choose module "kitex/pkg/protocol"

Lvnszn avatar Jun 20 '22 12:06 Lvnszn