Skip to content

Fix TCP and TLS DNS tests: properly pass connection callback

After the loop manager refactoring TCP DNS and TLS DNS unit tests ended up being broken.

The problem is that in these unit tests the code is written in such a way that for establishing a new connection tcpdns_connect() and tlsdns_connect() functions are used. However, in these tests as a connection callback function connect_connect_cb() is used. The function logic is responsible for determining the function for establishing subsequent connection.

To do so, it called get_stream_connect_function() ... which can return only tcp_connect() or tls_connect(), not tcpdns_connect() or tlsdns_connect(). That is definitely not what was implied.

All this time the unit tests were testing something, but now what was intended.

This commit fixes the problem by passing the tcpdns_connect() and tlsdns_connect() function pointers to connect_connect_cb().

Edited by Artem Boldariev

Merge request reports