[ 
https://issues.apache.org/jira/browse/DISPATCH-2022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311606#comment-17311606
 ] 

Jiri Daněk commented on DISPATCH-2022:
--------------------------------------

bq. I suggest that the fix for this error is to simply delete the test. The 
Tester Qdrouterd Process creator function has no concept of expect being maybe 
running or maybe not running. If the process status of the router is 
unpredictable then it cannot be tested.

The correct assertion should be "expect the process to exit with an error when 
it reads the config and figures out the format is wrong". Couldn't that be 
implemented with a timeout? If the router is still running after 30s, then the 
test failed. Or even better, if the router process does not exit and instead 
opens ports (sufficiently for wait=True to pass), then the test failed.

> system_tests_link_routes rarely fails with Cannot load configuration file
> -------------------------------------------------------------------------
>
>                 Key: DISPATCH-2022
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2022
>             Project: Qpid Dispatch
>          Issue Type: Test
>    Affects Versions: 1.16.0
>            Reporter: Jiri Daněk
>            Priority: Minor
>
> The following happens every time on AArch64, but it has once happened on 
> amd64 too:
> https://github.com/apache/qpid-dispatch/runs/2183106014?check_suite_focus=true#step:9:652
> {noformat}
> 14: Process 2203 error: still running
> 14: qdrouterd -c X.conf -I 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python
> 14: 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/build/tests/system_test.dir/system_tests_link_routes/ConnectionLinkRouteTest/test_config_file_bad/X-3.cmd
> 14: >>>>
> 14: 2021-03-24 10:05:46.694485 +0000 AGENT (error) Contents of failed config 
> file
> 14: 2021-03-24 10:05:46.694657 +0000 AGENT (error) Line 1 |[["router", {
> 14: 2021-03-24 10:05:46.694701 +0000 AGENT (error) Line 2 |"mode": "interior",
> 14: 2021-03-24 10:05:46.694738 +0000 AGENT (error) Line 3 |"id": "QDR.X",
> 14: 2021-03-24 10:05:46.694772 +0000 AGENT (error) Line 4 |"debugDumpFile": 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/build/tests/system_test.dir/system_tests_link_routes/ConnectionLinkRouteTest/test_config_file_bad/X-qddebug.txt"}],
> 14: 2021-03-24 10:05:46.694806 +0000 AGENT (error) Line 5 |["listener", {
> 14: 2021-03-24 10:05:46.694838 +0000 AGENT (error) Line 6 |"role": "normal",
> 14: 2021-03-24 10:05:46.694870 +0000 AGENT (error) Line 7 |"host": "0.0.0.0",
> 14: 2021-03-24 10:05:46.694902 +0000 AGENT (error) Line 8 |"port": "25577",
> 14: 2021-03-24 10:05:46.694935 +0000 AGENT (error) Line 9 |"saslMechanisms": 
> "ANONYMOUS",
> 14: 2021-03-24 10:05:46.694967 +0000 AGENT (error) Line 10 
> |"idleTimeoutSeconds": "120",
> 14: 2021-03-24 10:05:46.694999 +0000 AGENT (error) Line 11 
> |"authenticatePeer": "no"}],
> 14: 2021-03-24 10:05:46.695030 +0000 AGENT (error) Line 12 
> |connection.["linkRoute", {
> 14: 2021-03-24 10:05:46.695062 +0000 AGENT (error) Line 13 |"pattern": 
> "i/am/bad",
> 14: 2021-03-24 10:05:46.695094 +0000 AGENT (error) Line 14 |"direction": 
> "out"}],
> 14: 2021-03-24 10:05:46.695130 +0000 AGENT (error) Line 15 |["log", {
> 14: 2021-03-24 10:05:46.695200 +0000 AGENT (error) Line 16 |"module": 
> "DEFAULT",
> 14: 2021-03-24 10:05:46.695235 +0000 AGENT (error) Line 17 |"enable": 
> "trace+",
> 14: 2021-03-24 10:05:46.695267 +0000 AGENT (error) Line 18 |"includeSource": 
> "true",
> 14: 2021-03-24 10:05:46.695298 +0000 AGENT (error) Line 19 |"outputFile": 
> "X.log"}]]
> 14: 2021-03-24 10:05:46.695369 +0000 ERROR (error) Python: Exception: Cannot 
> load configuration file X.conf: Expecting value: line 12 column 1 (char 400)
> 14: 2021-03-24 10:05:46.738956 +0000 ERROR (error) Traceback (most recent 
> call last):
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 61, in __init__
> 14:     self.load(filename, raw_json)
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 242, in load
> 14:     self.load(f, raw_json)
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 244, in load
> 14:     sections = self._parserawjson(source) if raw_json else 
> self._parse(source)
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 208, in _parse
> 14:     sections = json.loads(js_text)
> 14:   File 
> "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/json/__init__.py", line 
> 348, in loads
> 14:     return _default_decoder.decode(s)
> 14:   File 
> "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/json/decoder.py", line 
> 337, in decode
> 14:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
> 14:   File 
> "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/json/decoder.py", line 
> 355, in raw_decode
> 14:     raise JSONDecodeError("Expecting value", s, err.value) from None
> 14: json.decoder.JSONDecodeError: Expecting value: line 12 column 1 (char 400)
> 14: 
> 14: During handling of the above exception, another exception occurred:
> 14: 
> 14: Traceback (most recent call last):
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 286, in configure_dispatch
> 14:     config = Config(filename)
> 14:   File 
> "/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
>  line 64, in __init__
> 14:     % (filename, e))
> 14: Exception: Cannot load configuration file X.conf: Expecting value: line 
> 12 column 1 (char 400)
> 14: 
> 14: 2021-03-24 10:05:46.739004 +0000 MAIN (critical) Router start-up failed: 
> Python: Exception: Cannot load configuration file X.conf: Expecting value: 
> line 12 column 1 (char 400)
> 14: qdrouterd: Python: Exception: Cannot load configuration file X.conf: 
> Expecting value: line 12 column 1 (char 400)
> 14: <<<<
> 14: 
> 14: ----------------------------------------------------------------------
> 14: Ran 40 tests in 61.780s
> 14: 
> 14: FAILED (errors=1)
>  9/37 Test #14: system_tests_link_routes ..........................***Failed  
>  61.92 sec
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to