Skip to content

Fix flaky router Tests

Timo Furrer requested to merge fix-flaky-router-tests into master
  • Fix flaky router Tests because of uncontrolled timer

The TestRouter_* tests sporadically failed with an unexpected call to the mock_reverse_tunnel_tunnel.MockPollingQuerier.PollKasUrlsByAgentId mock. This was, because there is a timer in the KAS tunnel finder (see https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/4855869ee465bd0762e9586d624e1691a945dbcd/cmd/kas/kasapp/router_kas_tunnel_finder.go#L110-110) that wasn't controlled during the test and this timer triggered after 10ms the mock. However, we don't really want that, because it's out of the scope for the affected tests.

Fixes #463 (closed)

Merge request reports