Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Testing: client_test: How to set --port option ?

Hi,

that stopped working when I moved the test suite to the Python unittest package. It can be fixed by removing the port option and parameter from sys.argv, or by passing some dummy args to unittest.main().

I'll look into it when I get a chance, unless someone else does it first.

Ian


On 17/08/2017 10:51, Tatsuzo Osawa wrote:
Hi there,

How to set --port option for client_test or client_test5 in paho.mqtt.testing ?

Seemed client_test.py recognized --port option but aborted as follows:

$ python3 client_test.py --port 1888
hostname localhost port 1888
usage: client_test.py [-h] [-v] [-q] [--locals] [-f] [-c] [-b]
                       [tests [tests ...]]
client_test.py: error: unrecognized arguments: --port

Almost same on client_test5.py:

$ python3 client_test5.py --port 1888
usage: client_test5.py [-h] [-v] [-q] [--locals] [-f] [-c] [-b]
                        [tests [tests ...]]

NOTE1: The usage printed before was different from normal usage as follows:

$ python3 client_test.py --port2 1888
option --port2 not recognized
  -h: --hostname= hostname or ip address of server to run tests against
  -p: --port= port number of server to run tests against
  -z: --zero_length_clientid run zero length clientid test
  -d: --dollar_topics run $ topics test
  -s: --subscribe_failure run subscribe failure test

NOTE2: If changed to "port = 1888" in the source file directory, the
new port number worked properly.

Regards.
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

--
Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto



Back to the top