Test Plan - ytyou/ticktock GitHub Wiki
1 Normal scenarios
1.1 Write
Generate a number of random data points, write them into the database.
Write Protocol
- Write using OpenTSDB telnet format, with TCP;
- Write using OpenTSDB telnet format, with HTTP;
- Write using OpenTSDB JSON format, with HTTP;
- Write using InfluxDB line protocol, with TCP;
- Write using InfluxDB line protocol, with HTTP;
Compression Versions
All the supported compression methods (currently, v0, v1, v2, v3) should be tested.
1.2 Query
- Query the raw data, check all data points match;
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
- Query with all the combination of tags and make sure results match the OpenTSDB results;
- Query without tags;
- Query with some, but not all, tags;
- Query with ALL tags;
- Query with tag=val*;
- Query with tag=val1|val2;
- Corner cases:
- Query non-existing metrics/tags and expect empty result;
- Query with non-existing aggregators/downsamplers and expect error;
- Query with misformated query and expect error;
- Test special chars in metric/tag names/values;
Some of the above tests should use dedicated query listener;
2 With Out-Of-Order (OOO) Data Points
Generate a number of random data points, some are out-of-order, write them into the database. Then,
- Query the raw data, check all data points match;
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
3 With Duplicate Data Points
Generate a number of random data points, some are out-of-order, some are duplicates, write them into the database. Then,
- Query the raw data, check all data points match;
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
4 With Compaction
- Generate a number of random data points, write them into the database.
- Query the raw data, check all data points match.
- Trigger compaction.
- Query the raw data, check all data points match.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
- Restart the database.
- Query the raw data, check all data points match.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
- Write some additional random data points into already compacted databse.
- Query the raw data, check all data points match.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
- Trigger compaction.
- Query the raw data, check all data points match.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
- Restart the database.
- Query the raw data, check all data points match.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;
5 With Recovery
- Generate a small amount of random data points, write them into the database. Make sure the number of data points is small enough so that they are NOT flushed to disk;
- Query the raw data, check all data points match.
- Wait for append.log to be generated;
- Kill (-9) the database forcefully (NOT normal shutdown);
- Start the database again.
- Query the raw data, check all data points are recovered.
- For all the combination of all the supported aggregators and downsamplers, query the database and make sure results match the OpenTSDB results;