Repository navigation
Tests for deleted/expired collection job creation - #4915
tgeoghegan wants to merge 1 commit into
Conversation
|
Draft because these tests are failing at the moment. |
e72fed4 to
c361322
Compare
Adds test cases for trying to re-create collection jobs that have been either deleted explicitly by a DELETE or implicitly by their constituent data expiring. Along the way, we do some pretty significant refactoring of `CollectionJobTest` so that various test setup routines become methods on that type.
c361322 to
602eae9
Compare
|
Now we have the tests we want so that we can assure that Janus behaves correctly. Next, we have to decide how we want Janus to behave. There's eight cases of interest:
I argue that: Regardless of whether a job was deleted or expired, trying to re-create it with the same query (idempotency key or time interval, resp.) but varying other parameters (extensions, agg param) should fail with batchOverlap. If a job was deleted and we try to re-create it with an identical request, we should serve HTTP 204 No Content, the same response we'd give if you tried to GET a deleted collection job. Note that's 204 No Content, not 404 Not Found! We are acknowledging that the collection job ever existed. Finally, if a job expires and we try to re-create it with identical parameters, then we could serve HTTP 200 and the CollectionJobResp. It turns out that even if the data is expired, we still have a To sum up, I am proposing:
|
Adds test cases for trying to re-create collection jobs that have been either deleted explicitly by a DELETE or implicitly by their constituent data expiring. Along the way, we do some pretty significant refactoring of
CollectionJobTestso that various test setup routines become methods on that type.