File

tests/test_util_random.lua @ 8267:42fad8465537

mod_s2s: Use a separate resolver object for each outgoing session Cleaner approach hopefully fixes problems with some peoples' DNS hanging after a while, failed DNS when a large number of queries are made at once, and source port re-use. Related issues: #487, 761, #991, #992, #1001
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 Sep 2017 23:12:47 +0100
parent 7172:32b74ad54432
line wrap: on
line source

-- Makes no attempt at testing how random the bytes are,
-- just that it returns the number of bytes requested

function bytes(bytes)
	assert_is(bytes(16));

	for i = 1, 255 do
		assert_equal(i, #bytes(i));
	end
end