IT[test_client_timeout]: Ensure queues are assigned #1031
+45
−27
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.
The
test_client_timeout.pyintegration test creates producers with artificially short timeouts in order to test the behavior of clients on open, reopen, and close timeouts. However, because bmqtool only supports a single timeout flag, the short timeouts can cause the initial open queue operation to fail on slow test runners. This patch makes these test more robust, by:introducing a client with a long timeout to each test, which connects and opens the necessary queues, assigning them on the primary; and
suspending the primary in each test as well as all other brokers in the cluster, to ensure that the queue already being assigned does not interfere with the short timeouts on the operations we want them for.
If we need to, we can add separate flags in bmqtool for each timeout exposed in
SessionOptions. This is a cheaper solution for just this test.