-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DROOLS-3368] Extend scenario runner to support DMN runtime #2194
Conversation
.findFirst() | ||
.orElseThrow(() -> new IllegalStateException("Cannot find a DMN model with resource=" + resourcePath)); | ||
} | ||
throw new IllegalStateException("This should not happen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this was just moved here, however please change the error message here. This doesn't say anything. E.g. "Cannot retrieve the model! Resource path or model name is not set properly."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to "Both resourcePath and namespace+modelName are not set, this should not happen". It is not possible that both are null
, it is just to have an error if in the future the logic will change without update this method
@Before | ||
public void init() { | ||
registryContext = new ContextImpl(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking (sorry:)): unnecessary empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
try { | ||
getDMNModelCommand.execute(registryContext); | ||
fail(); | ||
} catch (IllegalStateException ignored) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this exception a correct state? This looks incorrect. This kind of catches in tests could hide potential bugs in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrated all these catch(IllegalStateException ignored)
to Assertj with a constraint on the actual message
try { | ||
getDMNModelCommand.execute(registryContext); | ||
fail(); | ||
} catch (IllegalStateException ignored) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrated all these catch(IllegalStateException ignored)
to Assertj with a constraint on the actual message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, approving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
👍
* BXMSDOC-5425 Document DMN runtime listener prop * . * .
* BXMSDOC-5425 Document DMN runtime listener prop * . * .
NOTE: it cannot be tested via UI yet, only code + tests
@kkufova @Rikkola @gitgabrio
PR list
kiegroup/drools-wb#1027
https://github.com/kiegroup/drools/pull/2194
kiegroup/droolsjbpm-knowledge#353