• Miek Gieben's avatar
    Fix TestStubLookup and TestLookup (#213) · 34ffb2b3
    Miek Gieben authored
    Changes large parts of proxy lookup mechanism.
    
    The duplicate zone checking erroneous added a nameserver for each
    zone we are auth. for, creating to many backend hosts. So even when a
    host was determined do be Down() we still got an (identical) new one
    from the list.
    
    The Down() and failure checking for upstream hosts had data race in the
    uh.Fails check - we now use atomic.LoadInt32 for that.
    
    Use and debug the test/server.go test servers implementation in the
    TestStubLookup test to prevent going out to the internet.
    
    Also delete the stub cycle test. That test was wrong and did not test
    what it needed to be testing.  Deleted for now.
    34ffb2b3
proxy.go 3.44 KB