Skip to content

Commit 79399f4

Browse files
author
Shlomi Noach
committed
added documentation for local tests
1 parent 194500c commit 79399f4

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

doc/local-tests.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Local tests
2+
3+
`gh-ost` is continuously tested in production via `--test-on-replica alter='engine=innodb'`. These tests check the GitHub workload and usage, but not necessarily the general case.
4+
5+
Local tests are an additional layer of tests. They will eventually be part of continuous integration tests.
6+
7+
Local tests test explicit use cases, such as column renames, mix of time zones, special types and alters. Traits of a single test:
8+
9+
- Composed of a single table.
10+
- A single alter.
11+
- By default the alter is `engine=innodb`, but this can be overridden per-test
12+
- Scheduled DML operations, executed via `event_scheduler`.
13+
- `gh-ost` is set to execute and throttle for `5` seconds, at which time all tested DMLs are expected to operate.
14+
- The test requires a replication topology and utilizes `--test-on-replica`
15+
- The test checksums the two tables (original and _ghost_) and expects identical checksum
16+
- By default the test selects all (`*`) columns, but this can be overridden per-test
17+
18+
Tests are found under [localtests](https://github.com/github/gh-ost/tree/master/localtests). A single test is a subdirectory and tests are iterated alphabetically.
19+
20+
New data-integrity, synchronization issues or otherwise concerns are expected to be tested by new test cases.
21+
22+
While this is merged work is still ongoing.

localtests/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
# set -e
3+
# Local integration tests. To be used by CI.
4+
# See https://github.com/github/gh-ost/tree/doc/local-tests.md
5+
#
46

57
tests_path=$(dirname $0)
68
test_logfile=/tmp/gh-ost-test.log

0 commit comments

Comments
 (0)