Add unique queue names per E2E test suite #1497
Merged
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.
Summary
This PR addresses the interference issue between several running Node.js processes while executing Jest tests in parallel.
Before this PR, a Jest test process could emit messages to a queue, and a different process could receive them. This was causing problems like a mismatch between the cache keys being cleared, as several test suites have isolated cache key namespaces.
To avoid this kind of side effects, this PR adds a
queue
parameter to the test RabbitMQ client, so each test suite has the possibility of using a different queue, and therefore avoiding side effects between processes.Changes
queue
parameter toamqpClientFactory
, so the client class can choose using a custom queue name.