Skip to content
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

[incubator-kie-issues-1308] Exceptions in Service process #3553

Merged
merged 5 commits into from
Jun 21, 2024

Conversation

elguardian
Copy link
Contributor

@elguardian elguardian force-pushed the incubator-kie-issues-1308 branch from b9927cd to 6a70a1c Compare June 19, 2024 09:21
@elguardian elguardian marked this pull request as ready for review June 19, 2024 09:21
@apache apache deleted a comment from kie-ci3 Jun 19, 2024
Copy link
Contributor

@pefernan pefernan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 when green

@apache apache deleted a comment from kie-ci3 Jun 19, 2024
assertThat(workItem).isNotNull();
kruntime.getKogitoWorkItemManager().completeWorkItem(workItem.getStringId(), null);
// Check that event was passed to Event SubProcess (and grabbed by WorkItemHandler);
assertThat(caughtEventObjectHolder[0] != null && caughtEventObjectHolder[0] instanceof KogitoWorkItem).withFailMessage("Event was not passed to Event Subprocess.").isTrue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this assert missing in the new version of the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, also the proper state of the process.


org.kie.kogito.process.ProcessInstance<ExceptionThrowingServiceProcessModel> instance3 = definition.createInstance(model);
instance3.start();
assertThat(instance3.status()).isEqualTo(org.kie.kogito.process.ProcessInstance.STATE_ACTIVE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently don't see the value of this test:

  • It would be sufficient just to start a single instance
  • The assert should check if the message that is logged is in the defined format {0} - {1} - {2} - {3}

@elguardian elguardian force-pushed the incubator-kie-issues-1308 branch from 6a70a1c to 397adc1 Compare June 20, 2024 07:33
@elguardian elguardian requested a review from martinweiler June 20, 2024 07:34
Copy link
Contributor

@martinweiler martinweiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @elguardian

@elguardian elguardian merged commit e1b6dcc into apache:main Jun 21, 2024
6 checks passed
@elguardian elguardian deleted the incubator-kie-issues-1308 branch June 21, 2024 15:17
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceptions in Service process
3 participants