Commit Graph

5 Commits

Author SHA1 Message Date
Botond Dénes
542301fdc9 tests/test_table: add advanced create_test_table() overload
This overload provides a middle ground between the very generic, but
hard-to-use "expert version" and to very restrictive and simplistic
"beginner version". It allows the user to declaratively describe the
to-be-generated population in terms of bunch
`std::uniform_int_distribution` objects (e.g. number of rows, size of
rows, etc.).
This allows for generating a random population in a controlled way, with
a minimum amount of boiler-plate code on the user side.
2019-02-11 17:14:47 +02:00
Botond Dénes
7e1c1c2e8c tests/test_table: make create_test_table() customizable
Allow the user to specify the population of the table in a generic and
flexible way. This patch essentially rewrites the `create_test_table()`
implementation from scratch, so that it populates the table using the
partition generator passed in by the user. Backward compatibility is
kept, by providing a `create_test_table()` overload that is identical to
the previous API. This overload is now implemented on top of the generic
overload.
2019-02-11 17:14:47 +02:00
Botond Dénes
bc31d8cbcc tests/test_table: add keyspace and table name params
Allow the keyspace and table names to be customizable by the caller.
2019-02-08 16:30:17 +02:00
Botond Dénes
2d885c6453 tests/test_table: s/create_test_cf/create_test_table/
Also move it to the `test` namespace.
2019-02-08 16:30:17 +02:00
Botond Dénes
c2a6ac307f tests: move create_test_cf() to tests/test_table.{hh,cc}
In the next patches `create_test_cf()` will be made much more powerful
and as such generally useful. Move it into its own files so other tests
can start using it as well.
2019-02-08 16:30:17 +02:00