Skip to content

Idea: a cross-language test framework for all Alternator drivers #154

@nyh

Description

@nyh

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:

  1. Create an Alternator cluster with 3 nodes.
  2. Kill one of the 3 nodes abruptly.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions