Skip to content

Test 5: Updates #263

@bhauer

Description

@bhauer

See issue #133 concerning additional test types.

We are working on a test to exercise database updates. This is a preliminary specification and we may iterate this some. I've created this issue because we've already received an implementation of Test 5 prior to any specification being written up. If you want to begin implementation prior to a final specification, please just recognize that we may change the specification.

Test 5 is likely to be a variation of Test 3, the multiple database query test. Analogous to Test 3, it will include a URL-tunable parameter ("queries") specifying the number of updates to run.

  • The "queries" parameter must be bounded by the application to between 1 and 500. Any non-integer parameter should be treated as 1. Any integer less than 1 should be treated as 1. Any integer greater than 500 should be treated as 500.
  • The "queries" parameter specifies the count (N) of rows that require updating.
  • As with Test 3 (the multiple queries test), this test operates on the Worlds table that is known to have 10,000 rows.
  • For each update, the implementation should use the ORM to fetch a random row from the Worlds table, update the RandomNumber field to a new random integer between 1 and 10000, and then persist the updated row.
  • For each update, the resulting in-memory World object reflecting the new random number should be added to a list.
  • The resulting list of N updated rows should be returned as a JSON response. The updated values for the RandomNumber field should be reflected in the JSON response.

If available, the implementation may use a batch update statement. The implementation may use transactions.

For raw tests (that is, tests without an ORM), we still expect each updated row to receive a unique new RandomNumber value. It is not acceptable to change the RandomNumber value of all N rows to the same random number using an UPDATE ... WHERE id IN (...) clause.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions