- ./testrunner
- cp ./dnsdist ../../../regression-tests.dnsdist/
- cd ../../../regression-tests.dnsdist
- - DNSDISTBIN=./dnsdist ./runtests
+ - DNSDISTBIN=./dnsdist ./runtests -v
- rm -f ./dnsdist
- rm -f ./DNSCryptResolver.cert ./DNSCryptResolver.key
- cd ..
return result
- def __init__(self, providerName, providerFingerprint, resolverAddress, resolverPort=443):
+ def __init__(self, providerName, providerFingerprint, resolverAddress, resolverPort=443, timeout=2):
self._providerName = providerName
self._providerFingerprint = providerFingerprint.lower().replace(':', '').decode('hex')
self._resolverAddress = resolverAddress
addrType = self._addrToSocketType(self._resolverAddress)
self._sock = socket.socket(addrType, socket.SOCK_DGRAM)
+ self._sock.settimeout(timeout)
self._sock.connect((self._resolverAddress, self._resolverPort))
- self._sock.settimeout(2)
def _sendQuery(self, queryContent):
self._sock.send(queryContent)
if cls._dnsdist.poll() is not None:
cls._dnsdist.kill()
- cls._dnsdist.wait()
sys.exit(cls._dnsdist.returncode)
@classmethod
def setUpSockets(cls):
print("Setting up UDP socket..")
cls._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ cls._sock.settimeout(2.0)
cls._sock.connect(("127.0.0.1", cls._dnsDistPort))
@classmethod
time.sleep(delay)
if cls._dnsdist.poll() is None:
cls._dnsdist.kill()
- cls._dnsdist.wait()
+ cls._dnsdist.wait()
@classmethod
def ResponderIncrementCounter(cls):
if rrset:
response.answer.append(rrset)
+ sock.settimeout(2.0)
sock.sendto(response.to_wire(), addr)
+ sock.settimeout(None)
sock.close()
@classmethod
sock.listen(100)
while True:
(conn, address) = sock.accept()
+ conn.settimeout(2.0)
data = conn.recv(2)
(datalen,) = struct.unpack("!H", data)
data = conn.recv(datalen)
dnspython>=1.11
-nose==1.3.0
+nose>=1.3.7
libnacl>=1.4.3