You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// set a timeout for the write operation, if it takes too long, we will return with common.ErrWriteTooSlow and let caller retry the whole job instead of being stuck forever.
1. New integration tests can be written as shell scripts in`tests/TEST_NAME/run.sh`.
62
+
- `TEST_NAME` should start with `lightning_`.
63
+
- The script should exit with a nonzero error code on failure.
64
+
2. Add TEST_NAME to existing group in [run_group_lightning_tests.sh](./run_group_lightning_tests.sh)(Recommended), or add a new group for it.
65
+
3. If you add a new group, the name of the new group must be added to CI [lightning-integration-test](https://github.com/PingCAP-QE/ci/blob/main/pipelines/pingcap/tidb/latest/pull_lightning_integration_test.groovy).
66
+
67
+
Several convenient commands are provided in [utils](../../tests/_utils/):
68
+
69
+
*`run_sql <SQL>` — Executes an SQL query on the TiDB database
70
+
*`run_lightning [CONFIG]` — Starts `tidb-lightning` using `tests/TEST_NAME/CONFIG.toml`
71
+
*`check_contains <TEXT>` — Checks if the previous `run_sql` result contains the given text
72
+
(in `-E` format)
73
+
*`check_not_contains <TEXT>` — Checks if the previous `run_sql` result does not contain the given
74
+
text (in `-E` format)
75
+
*`check_lightning_log_contains <TEXT>` — Checks if the current lightning log contains the given text
0 commit comments