mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-02 14:02:44 +02:00
Fix flaky "TestProxyConfigStaticDNS".
Problem was caused by the initial wakeup check sometimes running, clearing the expected events too soon.
This commit is contained in:
parent
da00080303
commit
9010e91ff4
|
@ -78,19 +78,21 @@ func TestProxyConfigStaticSimple(t *testing.T) {
|
|||
|
||||
func TestProxyConfigStaticDNS(t *testing.T) {
|
||||
lookup := newMockDnsLookupForTest(t)
|
||||
lookup.Set("foo", []net.IP{
|
||||
net.ParseIP("192.168.0.1"),
|
||||
net.ParseIP("10.1.2.3"),
|
||||
})
|
||||
|
||||
proxy := newMcuProxyForConfig(t)
|
||||
config, dnsMonitor := newProxyConfigStatic(t, proxy, true, "https://foo/")
|
||||
proxy.Expect("add", "https://foo/", lookup.Get("foo")...)
|
||||
if err := config.Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
time.Sleep(time.Millisecond)
|
||||
|
||||
lookup.Set("foo", []net.IP{
|
||||
net.ParseIP("192.168.0.1"),
|
||||
net.ParseIP("10.1.2.3"),
|
||||
})
|
||||
proxy.Expect("add", "https://foo/", lookup.Get("foo")...)
|
||||
dnsMonitor.checkHostnames()
|
||||
|
||||
lookup.Set("foo", []net.IP{
|
||||
net.ParseIP("192.168.0.1"),
|
||||
net.ParseIP("192.168.1.1"),
|
||||
|
|
Loading…
Reference in a new issue