revng daemon: identify valid port

This commit resolves a non-deterministic test failure in `revng daemon`.

When running daemon tests, `randint` was used for selecting the listen
port, this caused test failures when the same port number was used for
reused. This has been replaced with the use of port 0 that guarantees
the use of an unused port and psutil to find the port number once it has
been bound by the daemon process.
This commit is contained in:
Giacomo Vercesi
2022-06-21 11:33:11 +02:00
parent dd08f2bf96
commit ffab18ee48
2 changed files with 14 additions and 4 deletions
+1
View File
@@ -23,3 +23,4 @@ pytest
requests
requests-toolbelt
gql
psutil