pull/76/head
Mark Qvist 2022-06-10 16:36:30 +02:00
rodzic c758c4d279
commit c4a7d17b2f
2 zmienionych plików z 20 dodań i 3 usunięć

Wyświetl plik

@ -183,7 +183,12 @@ class TestIdentity(unittest.TestCase):
# Test encrypt and decrypt of large chunks
print("Testing large chunk encrypt/decrypt")
mlen = 8*1000*1000
for i in range(1, 3):
if RNS.Cryptography.backend() == "internal":
lb = 1
else:
lb = 8
for i in range(1, lb):
msg = os.urandom(mlen)
b += mlen
id1 = RNS.Identity()

Wyświetl plik

@ -88,7 +88,11 @@ class TestLink(unittest.TestCase):
b = 0
pr_t = 0
receipts = []
num_packets = 500
if RNS.Cryptography.backend() == "internal":
num_packets = 50
else:
num_packets = 500
packet_size = RNS.Link.MDU
pstart = time.time()
print("Sending "+str(num_packets)+" link packets of "+str(packet_size)+" bytes...")
@ -104,7 +108,7 @@ class TestLink(unittest.TestCase):
print("Checking receipts...", end=" ")
all_ok = False
receipt_timeout = time.time() + 30
receipt_timeout = time.time() + 35
while not all_ok and time.time() < receipt_timeout:
for r in receipts:
all_ok = True
@ -192,6 +196,10 @@ class TestLink(unittest.TestCase):
def test_4_medium_resource(self):
if RNS.Cryptography.backend() == "internal":
print("Skipping medium resource test...")
return
init_rns(self)
print("")
print("Medium resource test")
@ -226,6 +234,10 @@ class TestLink(unittest.TestCase):
self.assertEqual(l1.status, RNS.Link.CLOSED)
def test_5_large_resource(self):
if RNS.Cryptography.backend() == "internal":
print("Skipping large resource test...")
return
init_rns(self)
print("")
print("Large resource test")