Fix intermittent test problem in rivertest
+ more transactional use
#226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one's aimed at fixing #225, in which I think what was happening is
that because we were inserting a test job on a non-transactional pool
with a state of
scheduled
, in some cases the queue maintainer'sscheduler service was actually changing it back to
available
beforethe test case would check it with a
RequireInserted
.As I was moving through the test suite, I realized that we could be
making a lot more use of
InsertTx
variants pretty much everywheresince we were mostly testing the transactional variables of
RequireInserted
, so that I changed those over.Then I realize that even when we were testing the non-transactional
variants, we didn't actually need a started client to do so, so I took
that code out. Then I realized that since we're not starting the client,
we didn't actually need to specify
Queues
orWorkers
(I believe theidea of an insert-only came about only after I wrote these tests
originally). And if we didn't need to specify
Workers
, then we didn'teven need the worker structs, so I got rid of those too.
Overall, I think we simplify things quite a bit, and because the client
doesn't need to be started, probably reduces the possibility of future
intermittency problems like we observed in #225.
Fixes #225.