startupdepcycles methods in test framework

76 views
Skip to first unread message

Edward Richards

unread,
Mar 13, 2023, 7:57:09 AM3/13/23
to AquaQ kdb+/TorQ
Hi,

I am trying to use the .servers.startupdepcyclestypename function as part of a k4unit test action, to make sure we have a connection to another process before proceeding with the test. I have found the method to loop indefinitely if it cannot make the connection, despite one of the arguments being a fixed number of retries.

I believe this is because startupdepcyclestypename relies on .lg.e to throw an error and break out of the while loop. However error trapping is enabled in the k4unit test process, so .lg.e does not throw an error in the first place, and the while loop is never escaped.

  • Is my understanding correct?
  • Should we use a custom method instead to ensure we have a connection?
  • Could it be argued that startupdepcyclestypename should always throw an error?
  • Could we turn off error trapping for a specific test action without breaking the test framework?

Many thanks

Emma Goodwin

unread,
Mar 14, 2023, 10:48:05 AM3/14/23
to AquaQ kdb+/TorQ

Hello Edward,

Your understanding is correct in that it’s the .lg.e that is causing the issues here. .lg.e will cause an exit when a process is still initialising which .servers.startupdepcyclestypename relies on as this function will typically only be used during initialisation. However, with the -test flag, tests are run after initialisation and so it doesn’t exit as expected as you have seen.

For the function to work as expected after initialisation it is true that it should error out each time so that it can exit and not get stuck in that looping behaviour. We are making the relevant changes to the .servers.startupdepcyclestypename function now.

Kind Regards,

Emma Goodwin
TorQ Support

Edward Richards

unread,
Mar 15, 2023, 4:06:51 AM3/15/23
to AquaQ kdb+/TorQ
Great, thank you Emma!

If you could update when the change has been merged that would be much appreciated.

Emma Goodwin

unread,
Mar 27, 2023, 11:28:36 AM3/27/23
to AquaQ kdb+/TorQ
Hi Edward,
That change should be merged now.
Kind Regards,
Emma Goodwin

Edward Richards

unread,
Mar 27, 2023, 11:48:57 AM3/27/23
to AquaQ kdb+/TorQ
Excellent, thank you.
Reply all
Reply to author
Forward
0 new messages