Patch Set 7: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/5028/7/tests/test_py3.py
File tests/test_py3.py:

Line 35:     server = loop.run_until_complete(loop.create_server(CtrlProtocol, 
'127.0.0.1', 4249))
this test assumes that this particular port is available at runtime of the 
test.  Particularly since it's a port used by some real osmocom program, 
chances are high that a jenkins job will execute in parallel on a given build 
note which also uses that port.  Best idea might be to chose a random port 
here, and/or deal with failure to bind and re-attempt for a couple of times?  
clashes of random ports are unlikely.


Line 40:     
loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py',
 '-g', 'mnc', '-d' 'localhost'), loop = loop))
you bind the server to 127.0.0.1 but you connect the client to localhost.  
Localhost also resolves to e.g. ::1 so best to be consistent on client and 
server.


-- 
To view, visit https://gerrit.osmocom.org/5028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1
Gerrit-PatchSet: 7
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-HasComments: Yes

Reply via email to