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

Charles E. Rolke commented on DISPATCH-2022:
--------------------------------------------

The lines of code quoted in comment #1 used to say:
{code:java}
        cfg = Qdrouterd.Config(config)
        router = self.tester.qdrouterd("X", cfg, wait=False)
        # we expect the router to fail
        while router.poll() is None:
            sleep(0.1)
        self.assertRaises(RuntimeError, router.teardown)
        self.assertNotEqual(0, router.returncode)
{code}
Does this look more like a suitable timeout loop?

The code was replaced under _DISPATCH-1678: fix misleading ASAN tracebacks for 
pooled items._
 * It is unclear how the code change relates to ASAN and pooled objects. Maybe 
The code quoted here causes object leaks?

Logically this test has nothing to do with link routes and this test should be 
moved out of the current source file. The unparsable config file should fail 
the same way if the failing config object has _linkroute_ in its name or not. 
But that's a separate issue.

> 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