Check network group of connections in process test if it isn't for i2p
This commit is contained in:
parent
78f170451b
commit
cfd054fcf4
|
@ -9,6 +9,8 @@ import time
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
|
from minode.structure import NetAddrNoPrefix
|
||||||
|
|
||||||
try:
|
try:
|
||||||
socket.socket().bind(('127.0.0.1', 7656))
|
socket.socket().bind(('127.0.0.1', 7656))
|
||||||
i2p_port_free = True
|
i2p_port_free = True
|
||||||
|
@ -102,6 +104,12 @@ class TestProcess(TestProcessProto):
|
||||||
if len(self.connections()) > self._connection_limit / 2:
|
if len(self.connections()) > self._connection_limit / 2:
|
||||||
_time_to_connect = round(time.time() - _started)
|
_time_to_connect = round(time.time() - _started)
|
||||||
break
|
break
|
||||||
|
if '--i2p' not in self._process_cmd:
|
||||||
|
groups = []
|
||||||
|
for c in self.connections():
|
||||||
|
group = NetAddrNoPrefix.network_group(c.raddr[0])
|
||||||
|
self.assertNotIn(group, groups)
|
||||||
|
groups.append(group)
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
else:
|
else:
|
||||||
self.fail(
|
self.fail(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user