layotto icon indicating copy to clipboard operation
layotto copied to clipboard

[GLCC] Add more components and api features in integrate test

Open zhenjunMa opened this issue 4 years ago • 1 comments

This issue will participate in the chinese GLCC activity . So I wrote it in chinese:

1、题目描述

为 Layotto 的集成测试增加更多的组件以及覆盖更多的 API 特性。

2、编码任务

  • [ ] 在启动配置文件中增加etcdzookeeper等组件的配置
  • [ ] 修改other_component_integrate_test.go文件来支持更多组件的代码
  • [ ] 在redis_integrate_test.go以及新增的组件中增加更多的测试场景

可以参考的代码如下:

功能相关:

  1. 镜像构建模板:docker/app/integrate/Dockerfile
  2. 集成测试依赖的配置文件:configs/integrate_config.json
  3. 测试启动脚本:sdk/go-sdk/test/runtime/integrate_test.sh
  4. 测试代码:sdk/go-sdk/test/runtime/redis_integrate_test.go

入口相关:

  1. github Action入口:.github/workflows/layotto-ci.yml中的runtime-integrate 模块
  2. 编译相关:Makefile中的integrate.runtime模块

3、技能要求和编程语言

  • 需要使用 Go 语言进行开发,以及熟悉常用基础设施组件的用法,如 etcd、zookeeper 等
  • 了解 docker 的基础知识,因为集成测试是跑在容器中。

4、预期完成结果

  1. 为 Layotto 的集成测试引入更多的组件,如 etcd、zookeeper。
  2. 为各个 API 的特性进行更大范围的覆盖。

5、题目详情

Layotto 目前已经接入了数百应用,未来也会有更多的用户,因此后续各种代码的开发除了基本的单元测试以外,还需要引入集成测试来保证项目的整体稳定性。

image

目前 Layotto 中已经实现了一个初版的集成测试模块,它使用 Redis 作为的实现组件,针对 State API, Lock API, Sequencer API的基本功能进行了验证。但这只是一个开始,我们还需要增加更多的实现组件,如etcd, zookeeper, 同时也需要针对各个 API 的高级特性, 边界条件进行校验。

导师

[email protected]

价值

大幅提升 Layotot 的稳定性,减少后续开发对已有功能产生影响的隐患。

zhenjunMa avatar Mar 14 '22 12:03 zhenjunMa

action:

  • [ ] 确认下哪位同学、进度如何 @zhenjunMa

seeflood avatar Jul 02 '22 13:07 seeflood