Hi,
I have added some tests in a plugin (based on BPartners and Users) that are failing while executing the InitialClientSetup process (which is creating BP/Users).
That results in a failure of the process and a not created tenant.
In this case, the tests should not be conducted as several values are still not filled.
I wanted to add some conditions to allow not to conduct those tests.
My first idea was to use the transaction name/displayname.
if trxName starts with '
Setup_' and display name is '
org.compiere.model.MSetup_createClient', then tests are not conducted.
But I don't find this clean (that can be changed without I noticed it).
So wondering if the following change would be acceptable (haven't tested yet, but I think it should work)
In the InitialClientSetup.java class, right after the try { (line 274), add
something like
Env.setContext(getCtx(), "INITIAL_CLIENT_SETUP_RUNNING", "Y");and add a finally block with this content
Env.setContext(getCtx(), "INITIAL_CLIENT_SETUP_RUNNING", "");And then I can test this value in the plugin.
I think that can be achieved directly in the plugin using BEFORE_PROCESS/AFTER_PROCESS events, but that may have sense to make it available in trunk.
wdyt?
Thanks,
Nicolas