View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005209||Taler||merchant backend API (C)||public||2017-12-10 14:47||2020-07-24 11:56|
|Reporter||Florian Dold||Assigned To||Florian Dold|
|Priority||low||Severity||minor||Reproducibility||have not tried|
|Status||resolved||Resolution||no change required|
|Product Version||git (master)|
|Target Version||0.7.1||Fixed in Version||0.8|
|Summary||0005209: test cases should not use fixed port numbers|
|Description||For example the merchant lib test uses port 8081, which clashes with some buildbot port.|
We can also run into cases where two tests are executed simultaneously, with some bad luck one of them will fail.
We can find free ports e.g. with this method: https://www.dnorth.net/2012/03/17/the-port-0-trick/
The idea is to:
1) select a port that is currently free
2) start the exchange (or whatever component we need to run)
3) if it failed (because of a race on the port), try again with another port for some small number of tries
And on systems where it's not supported, we fall back to a fixed port number.
|Tags||No tags attached.|
We actually have logic for picking free ports like that in GNUnet (testing subsystem uses it). But it's usually quite a bit of extra work to achieve this level of flexibility, especially as we would have to _write_ configuration files with those port numbers in them in many cases.
So for now, I think we should simply avoid conflicting port numbers on taler.net, maybe use more, eh, unusual ones, but consistently changing the test logic to pick free ports is really not worth the trouble.
I've already changed the offending port, and now the tests work again.
Then let's not make the dynamic port selection a priority now, but eventually I'd like to have it, since when more people do something with the backend we'll hear about this again eventually ;-)
||I think this not relevant anymore, as we have the netjail now!|
|2017-12-10 14:47||Florian Dold||New Issue|
|2017-12-10 14:47||Florian Dold||Status||new => assigned|
|2017-12-10 14:47||Florian Dold||Assigned To||=> Marcello Stanisci|
|2017-12-10 14:49||Florian Dold||Description Updated||View Revisions|
|2017-12-10 14:49||Florian Dold||Assigned To||Marcello Stanisci => Christian Grothoff|
|2017-12-10 15:11||Christian Grothoff||Note Added: 0012650|
|2017-12-10 15:11||Christian Grothoff||Assigned To||Christian Grothoff => Florian Dold|
|2017-12-10 15:11||Christian Grothoff||Status||assigned => feedback|
|2017-12-10 15:11||Christian Grothoff||Product Version||=> git (master)|
|2017-12-10 15:19||Florian Dold||Note Added: 0012651|
|2017-12-10 15:19||Florian Dold||Priority||normal => low|
|2020-04-06 21:00||Florian Dold||Status||feedback => resolved|
|2020-04-06 21:00||Florian Dold||Resolution||open => no change required|
|2020-04-06 21:00||Florian Dold||Note Added: 0015537|
|2020-04-13 02:40||Christian Grothoff||Target Version||=> 0.7.1|
|2020-07-24 11:56||Christian Grothoff||Fixed in Version||=> 0.8|