jiridanek opened a new pull request #880: URL: https://github.com/apache/qpid-dispatch/pull/880
This is a quick work-in-progress attempt that I've created. First, majority of functions in the router require that the memory pools are initialized. I've decided to just start the whole router to get that. It may be possible to initialize less of the router, which I will explore later. Being able to initialize less will be also good for timed unittests, essentially small benchmarks, around for example, measuring how long adding autoLinks takes, and so on. Starting and stopping router has one small caveat. The way I do it now, if I shut down the router too soon after starting it, things break (I get leaks and/or segfaults). So I had to add a 500ms wait. There has to be a way to detect that startup is done, but I haven't found it yet. I need to redirect logging in the test. I think it should not be difficult to accomplish, but I did not look into it yet. Looking at the logs is going to be _the_ way to detect problems, because the router code often logs thing right away, and does not return error information in return codes. So this has to be done well, because it will be used often. Regarding the specific tests, I was thinking about the following issues * "Adding new config address, autolinks and link routes become slower as more get added" * "Deliveries with modified state are changed when relayed to a broker" This is what the code in the PR prints. The first is from trying to start the broker twice, and the last is from adding a linkRoute. There is no separation between, but it is mostly three times the same thing. Not something that should be printed during regular runs of the test, it's there for now just to show something. ``` 70: Test command: /nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin/python "/home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/run.py" "/home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests" 70: Test timeout computed to be: 600 70: Container Name: 0 70: Container Initialized 70: Node Type Registered - router 70: Node of type 'router' installed as default node 70: Router started in Endpoint mode 70: Version: 1.15.0-SNAPSHOT 70: Policy Initialized 70: Core module present but disabled: edge_router 70: Core module present but disabled: core_test_hooks 70: Core module present but disabled: edge_addr_tracking 70: Core module present but disabled: address_lookup_server 70: Core module enabled: address_lookup_client 70: Stuck delivery detection: Scan interval: 30 seconds, Delivery age threshold: 10 seconds 70: Core module enabled: stuck_delivery_detection 70: Core module present but disabled: mobile_sync 70: Streaming link scrubber: Scan interval: 30 seconds, max free pool: 128 links 70: Core module enabled: streaming_link_scruber 70: Router Core thread running. 0/0 70: Core action 'subscribe' 70: In-process subscription M/$management 70: Core action 'subscribe' 70: In-process subscription L/$management 70: Default node removed 70: Router Core thread exited 70: Finalizing core module: streaming_link_scruber 70: Finalizing core module: stuck_delivery_detection 70: Finalizing core module: address_lookup_client 70: [doctest] doctest version is "2.3.6" 70: [doctest] run with "--help" for options 70: Container Name: 0 70: Container Initialized 70: Node of type 'router' installed as default node 70: Router started in Endpoint mode 70: Version: 1.15.0-SNAPSHOT 70: Policy Initialized 70: Core module present but disabled: edge_router 70: Core module present but disabled: core_test_hooks 70: Core module present but disabled: edge_addr_tracking 70: Core module present but disabled: address_lookup_server 70: Core module enabled: address_lookup_client 70: Stuck delivery detection: Scan interval: 30 seconds, Delivery age threshold: 10 seconds 70: Core module enabled: stuck_delivery_detection 70: Core module present but disabled: mobile_sync 70: Streaming link scrubber: Scan interval: 30 seconds, max free pool: 128 links 70: Core module enabled: streaming_link_scruber 70: Router Core thread running. 0/0 70: Core action 'subscribe' 70: In-process subscription M/$management 70: Core action 'subscribe' 70: In-process subscription L/$management 70: Default node removed 70: Router Core thread exited 70: Finalizing core module: streaming_link_scruber 70: Finalizing core module: stuck_delivery_detection 70: Finalizing core module: address_lookup_client 70: Container Name: 0 70: Container Initialized 70: Node of type 'router' installed as default node 70: Router started in Endpoint mode 70: Version: 1.15.0-SNAPSHOT 70: Policy Initialized 70: Core module present but disabled: edge_router 70: Core module present but disabled: core_test_hooks 70: Core module present but disabled: edge_addr_tracking 70: Core module present but disabled: address_lookup_server 70: Core module enabled: address_lookup_client 70: Stuck delivery detection: Scan interval: 30 seconds, Delivery age threshold: 10 seconds 70: Core module enabled: stuck_delivery_detection 70: Core module present but disabled: mobile_sync 70: Streaming link scrubber: Scan interval: 30 seconds, max free pool: 128 links 70: Core module enabled: streaming_link_scruber 70: Router Core thread running. 0/0 70: Core action 'subscribe' 70: In-process subscription M/$management 70: Core action 'subscribe' 70: In-process subscription L/$management 70: Error performing CREATE of org.apache.qpid.dispatch.router.config.autoLink: Body of request must be a map 70: Error configuring linkRoute: Body of request must be a map 70: =============================================================================== 70: [doctest] test cases: 5 | 5 passed | 0 failed | 0 skipped 70: [doctest] assertions: 36 | 36 passed | 0 failed | 70: [doctest] Status: SUCCESS! 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1.81 sec Process finished with exit code 0 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org