No outgoing nodes for sub-process when using the mock workchain

There is a problem when running a test using the mock workchain.

wkchain = generate_workchain(QeAppWorkChain, inputs)
# this will call pdos workchain, and the `call_link_label` is `pdos`
# this will failed, and the outgoing nodes is empty.

I checked the status of the process, and all of them are CREATED.

Hi :wave: Xing,
Can you show the implementation of run_pdos method? I guess it calls submit to run the pdos workchain and somehow parent workchain didn’t create the outgoing node yet.

In terms of mock test a workchain, you don’t need to actually run/submit a workchain to create the WorkChainNode with called Node attached. You can mock a ProcessNode directly with setting the incomming/outgoing nodes. Please have a look at how we mock test a CalcJobNode in aiida-quantumespresso/tests/ at 0859d0a05c495c8a92208d118da6066f385600a7 · aiidateam/aiida-quantumespresso · GitHub

This topic was automatically closed 4 hours after the last reply. New replies are no longer allowed.