Skip to content
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

refactor: write integration tests in Golang #806

Merged
merged 13 commits into from
Sep 3, 2022

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Sep 1, 2022

Motivation

TCL scripts are hard for debugging. It helps to bring Redis tests but we can later refactor them for easy maintaining and debugging.

I ever try to write it in Rust #693 but finally propose this patch in Golang. As Rust's testing is less than mature and our contributors like @git-hulk & @torwig should be familiar with Golang. Also, go-redis project has a backlink to Kvrocks and when possibly, I'm glad to use it for Kvrocks' tests.

Implementation

  1. Add go integration cases mod under tests/gocase.
  2. Implement the start server logic at util/server.go
  3. Migrate TCL test util/command to the new integration framework.
  4. Wire logic to the CI workflow.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@git-hulk
Copy link
Member

git-hulk commented Sep 2, 2022

Thanks @tisonkun

The tcl is really hard to debug for myself. Go or Rust are good to me but I think Go will be easier for developers to learn and participate. Can see other guys have any feedback on this topic,

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@git-hulk
Copy link
Member

git-hulk commented Sep 3, 2022

I looked through this PR and it’s clear enough for me. To see other guys have any questions? @PragmaTwice @ShooterIT @Alfejik @caipengbo

Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisonkun
Copy link
Member Author

tisonkun commented Sep 3, 2022

It happens that I have some time to work on this migration. I'll merge this patch tomorrow if no more objections and continue the tasks.

Feel free to review after merge.

@tisonkun tisonkun merged commit c9d175a into apache:unstable Sep 3, 2022
@tisonkun tisonkun deleted the gocase branch September 3, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants