matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Feature Request]: Integration Testing Framework

Open zhangxu19830126 opened this issue 2 years ago • 4 comments

Is there an existing issue for the same feature request?

  • [X] I have checked the existing issues.

Is your feature request related to a problem?

No

Describe the feature you'd like

We need a framework that can write integration tests to start or stop a test framework that includes a DNStore and a LogServiceStore. This framework can be interfaced with unit tests to write integration test code.

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

zhangxu19830126 avatar Jul 15 '22 02:07 zhangxu19830126

Rough design for our integration test framework:

  1. Start a cluster in which log service and dn service were started according to expectation;
  2. After cluster started, do some operation, such as stop/restart log service or dn service;
  3. Then check the running state of cluster in order to assert that the cluster takes proper reaction;

So test framework should support flexible operation and provide ways to assert cluster's running state.

In order to start dn service and log service, we should support different options in order to start a cluster as expectation.

cnutshell avatar Jul 19 '22 10:07 cnutshell

For log service, we need to handle Add, Remove, Start, Stop commands. As to dn service, we only need to handle Add and Remove.

  • Add and Remove implies data updates
  • Start and Stop only implies operation, there wouldn't be data updates.

cnutshell avatar Jul 20 '22 09:07 cnutshell

In order to start test cluster, we should start dn and log stores first.

cnutshell avatar Jul 22 '22 07:07 cnutshell

dn services depends on log services, we should start log services first.

cnutshell avatar Jul 30 '22 02:07 cnutshell