Fix e2e test races when looking at hostmap counts (#1795)

This commit is contained in:
Nate Brown
2026-07-09 18:48:14 -05:00
committed by GitHub
parent 1b84bd0050
commit 5ecdd4eaa9
3 changed files with 48 additions and 36 deletions
+8
View File
@@ -125,6 +125,14 @@ func (c *Control) GetHostmap() *HostMap {
return c.f.hostMap
}
// GetHostmapIndexCount returns the number of entries in the main hostmap Indexes table, holding
// the hostmap read lock so tests can poll it while connection manager churns tunnels.
func (c *Control) GetHostmapIndexCount() int {
c.f.hostMap.RLock()
defer c.f.hostMap.RUnlock()
return len(c.f.hostMap.Indexes)
}
func (c *Control) GetF() *Interface {
return c.f
}