mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Remove internal loop detection (#2647)
* Remove internal loop detection I can't actually think of a situation where we can create an internal loop. Sure externally triggered cycles can happen, but this is where the *loop* plugin comes in that detects those. Fixes #2602 Signed-off-by: Miek Gieben <miek@miek.nl> * Remove test Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -48,21 +48,6 @@ func TestNewServer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIncrementDepthAndCheck(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
var err error
|
||||
for i := 0; i <= maxreentries; i++ {
|
||||
ctx, err = incrementDepthAndCheck(ctx)
|
||||
if err != nil {
|
||||
t.Errorf("Expected no error for depthCheck (i=%v), got %s", i, err)
|
||||
}
|
||||
}
|
||||
_, err = incrementDepthAndCheck(ctx)
|
||||
if err == nil {
|
||||
t.Errorf("Expected error for depthCheck (i=%v)", maxreentries+1)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkCoreServeDNS(b *testing.B) {
|
||||
s, err := NewServer("127.0.0.1:53", []*Config{testConfig("dns", testPlugin{})})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user