Skip to content

Change simple dns strategy test case in more DNS way#680

Merged
averevki merged 1 commit intoKuadrant:mainfrom
azgabur:dns_refactor
Jun 6, 2025
Merged

Change simple dns strategy test case in more DNS way#680
averevki merged 1 commit intoKuadrant:mainfrom
azgabur:dns_refactor

Conversation

@azgabur
Copy link
Copy Markdown
Member

@azgabur azgabur commented May 22, 2025

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.

@azgabur azgabur requested a review from averevki May 22, 2025 19:29
@azgabur
Copy link
Copy Markdown
Member Author

azgabur commented Jun 4, 2025

@maleck13 We want to simplify this test, do you think this makes sense?
This test is for simple strategy for multiple clusters. Currently we check in 10 iterations that successive DNS queries will return always changing order of A records. I think just checking that the response A record set is the same as the expected IP addresses of the Gateways involved.
This test sometimes fails randomly and I want to stabilize it this way. Notably it is not failing in our nightly test runs which surprises me a little.

@maleck13
Copy link
Copy Markdown

maleck13 commented Jun 4, 2025

Yes @azgabur I agree. We shouldn't test the order 👍

Comment thread testsuite/tests/multicluster/test_simple_strategy.py Outdated
Signed-off-by: Alex Zgabur <azgabur@redhat.com>
@averevki averevki merged commit 1c95bf7 into Kuadrant:main Jun 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants