Bug 1304968 - Not possible to use Stateless session in Test Scenarios
Summary: Not possible to use Stateless session in Test Scenarios
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Toni Rikkola
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 07:16 UTC by Anton Giertli
Modified: 2020-03-27 19:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:34:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2152821 0 None None None 2016-02-05 07:26:50 UTC

Description Anton Giertli 2016-02-05 07:16:12 UTC
Description of problem:
I have inspected the internal classes responsible for actual execution of Test Scenarios and noticed that whenever it is necessary to create a KieSession only Stateful will be created. So supplying a Stateless KieSession is simply not allowed - it will fail with this error message:

Test scenario runner could not find a stateful knowledge session with the name 'defaultSession'.

Version-Release number of selected component (if applicable):

BRMS 6.2.0
BPM Suite 6.2.0

How reproducible:
always

Steps to Reproduce:
1. Define Stateless session in business-central or directly in kmodule.xml
2. Configure Test Scenario with it
3. Run it

Actual results:
Test Scenarios can be configured only with Stateful session.

Expected results:
Test Scenarios can be configured with both, Stateful and Stateless sessions


Additional info:
Only Stateful is created
https://github.com/droolsjbpm/kie-wb-common/blob/6.3.x/kie-wb-common-services/kie-wb-common-services-backend/src/main/java/org/kie/workbench/common/services/backend/session/SessionServiceImpl.java#L54

Comment 2 Toni Rikkola 2016-02-05 15:04:00 UTC
This is because the test scenarios can only be used with stateful sessions. Workaround is to make a stateful session for testing, but this is not ideal because then your not testing with the session that is used in production.


Note You need to log in before you can comment on or make changes to this bug.