-
Notifications
You must be signed in to change notification settings - Fork 12
Description
There are various features that we need to add to Alternator drivers in every single language. A recent example is handling of Scylla nodes that are not yet available or no longer available (scylladb/scylladb#26326). But there's a whole list of features which we added, or want to add, to every single Alternator driver in every single language - see a collection of these in
#152.
The proposal in this issue is to develop a testing framework that will allow us to test these features on every single language, without needing to rewrite each test in N different languages. More importantly, I want to avoid even the need to remember to write the test in each new language: There's a real risk so if we forget to port some feature to our Fortran driver, and we also forget to port the test for that feature for the Fortran driver, then we'll never remember to do that and the feature will forever remain missing in the Fortran driver. The goal of this issue is to prevent this.
I think it should not be too hard to create a test framework that creates a Scylla cluster (or different Scylla clusters for different situations), and then takes a "script" of DynamoDB operations in a pseudo-language (not in any specific language) that the framework can translate into SDK calls in different languages. For example, for #26326 the test script might say something like:
- Create an Alternator cluster with 3 nodes.
- Kill one of the 3 nodes abruptly.
- Run a "PutItem" request. It shouldn't have an error even if the load balancer chose the dead node as the coordinator because (if #26326 is done) the retry will happen on a different node.
The idea is that every language the specific command to connect to the cluster and run a "PutItem request" and look at its response will be different, but other than that, the test will be the same.
CC @dkropachev