The problem with multiple replica sets in the group
The function will not work correctly if there is more than one replica set in the group. My test cluster usually consists of two routers and two to three shards.
https://github.com/tarantool/luatest/blob/b1e3631e32d296fb22a0789a63215a0c6b3b0384/luatest/server.lua#L154
The code you linked traverses over the whole groups-replicasets-instances topology and it doesn't assume anything about amount of replicasets in a group or amount of instances in a replicasets. Please, clarify your problem.
The code you linked traverses over the whole groups-replicasets-instances topology and it doesn't assume anything about amount of replicasets in a group or amount of instances in a replicasets.
This is wrong
In the given case the find_advertise_uri function tries to find the router-msk instance in the router-spb replicaset, fails and the No suitable URI to connect is found error is reported.
I ack the problem.
https://github.com/tarantool/luatest/blob/b1e3631e32d296fb22a0789a63215a0c6b3b0384/luatest/server.lua#L152-L157
This break should be continue.