Change simple dns strategy test case in more DNS way #680
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.
To test "Simple strategy" we do not really need to check the round-robin way of returned DNS responses. In the description of AWS route 53 Simple strategy it is stated that they return the responses at random. The standard DNS behavior when multiple A records exist for single name is to return the order in round-robin or random fashion. In ideal world how this test is currently written we would want to expect this behavior. But due to caching, recursive resolver different implementation, system dns implementation or the randomness we cant always guarantee this behavior to be exact.
Checking that in the response are all A records that are expected and not bothering with their orders seems to me as better and more durable testing scenario with less false fails while trusting that the DNS provider or recursive resolver provider or any other places where it makes a difference, to return the order of records at random.