DynamoDB's documentation https://docs.aws.amazon.com/sdkref/latest/guide/feature-compression.html suggests that DynamoDB allows request bodies to be compressed (currently only by gzip). The purpose of patch is to have a test reproducing this feature. The test shows us that indeed DynamoDB understands compressed requests using the "gzip" encoding, but Alternator does *not*, so the new test is xfail. As you can see in the test code, although the low-level SDK (botocore) can send compress requests, this is not actually enabled for DynamoDB and we need to resort to some trickery to send compressed requests. But the point is that once we do manage to send compressed requests, the test shows us that they work properly on AWS, but fail on Alternator. The failure of the compressed requests on Alternator is reported like: An error occurred (ValidationException) when calling the PutItem operation: Parsing JSON failed: Invalid value. at 70459088 This error message should probably be improved (what is that high number?!) but of course even better would be to make it really work. By enabling tracing on alternator-server (e.g., edit test/cqlpy/run.py and add `'--logger-log-level', 'alternator-server=trace',`) we can see exactly what request the SDK sends Alternator. What we can see in the request is: 1. The request headers are uncompressed (this is expected in HTTP) 2. There is a header "Content-Encoding: gzip" 3. The request's body is binary, a full-fleged gzip output complete with a gzip magic in the beginning. Refs #5041 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes scylladb/scylladb#27049
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.