Re: Fake DNS query result inside a test

2012-11-07 Thread Weijun Wang
Hi Vinnie As you know, krb5 can read KDC info from DNS and I want to write a regression test on it. However, the test must be independent and it should not access any server not inside the test suite. Java uses those 2 lines to read the KDC info. Surely it would work if I write my own DNS se

Re: Fake DNS query result inside a test

2012-11-07 Thread Vincent Ryan
Are you suggesting to run a local DNS server? If so then it is easy to access that via a JNDI context. If you're proposing developing a basic JNDI service provider then that would be more effort. On 7 Nov 2012, at 01:05, Weijun Wang wrote: > Hi Vinnie > > I want to write a regression test so

Fake DNS query result inside a test

2012-11-06 Thread Weijun Wang
Hi Vinnie I want to write a regression test so that Context ctx = NamingManager.getURLContext("dns", new Hashtable<>(0)); Attributes attrs =((DirContext)ctx).getAttributes( "_kerberos._udp.ASDF.COM.", SRV_RR_ATTR); can return some entries without querying a real exter