Search in sources :

Example 11 with LRUCache

use of org.minidns.cache.LRUCache in project minidns by MiniDNS.

the class DNSSECTest method testUniDueSigFail.

@IntegrationTest(expected = DNSSECValidationFailedException.class)
public static void testUniDueSigFail() throws IOException {
    DNSSECClient client = new DNSSECClient(new LRUCache(1024));
    client.query("sigfail.verteiltesysteme.net", Record.TYPE.A);
}
Also used : LRUCache(org.minidns.cache.LRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient)

Example 12 with LRUCache

use of org.minidns.cache.LRUCache in project minidns by MiniDNS.

the class IterativeDNSClientTest method loopIterativeTest.

@SuppressWarnings("unchecked")
@Test(expected = IterativeClientException.LoopDetected.class)
public void loopIterativeTest() throws IOException {
    IterativeDNSClient client = new IterativeDNSClient(new LRUCache(0));
    applyZones(client, rootZone(record("a", ns("a.ns")), record("b", ns("b.ns")), record("a.ns", a("1.1.1.1")), record("b.ns", a("1.1.1.2"))), zone("a", "a.ns", "1.1.1.1", record("test.a", ns("a.test.b"))), zone("b", "b.ns", "1.1.1.2", record("test.b", ns("b.test.a"))));
    assertNull(client.query("www.test.a", TYPE.A));
}
Also used : LRUCache(org.minidns.cache.LRUCache) Test(org.junit.Test)

Aggregations

LRUCache (org.minidns.cache.LRUCache)12 DNSMessage (org.minidns.dnsmessage.DNSMessage)6 Test (org.junit.Test)5 DNSSECClient (org.minidns.dnssec.DNSSECClient)5 DNSClient (org.minidns.DNSClient)2 Data (org.minidns.record.Data)2 Record (org.minidns.record.Record)2 InetAddress (java.net.InetAddress)1 ArrayList (java.util.ArrayList)1 Ignore (org.junit.Ignore)1 DNSCache (org.minidns.DNSCache)1 ExtendedLRUCache (org.minidns.cache.ExtendedLRUCache)1 FullLRUCache (org.minidns.cache.FullLRUCache)1 DNSDataSource (org.minidns.source.DNSDataSource)1 NetworkDataSourceWithAccounting (org.minidns.source.NetworkDataSourceWithAccounting)1