Bug 1025296 - Delay of KieScanner is more than expected
Summary: Delay of KieScanner is more than expected
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 12:23 UTC by Tomas David
Modified: 2014-08-06 20:17 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:17:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas David 2013-10-31 12:23:56 UTC
Description of problem:
When KieScanner.start(pollingInterval) is called. Delay of KieScanner is more than 200ms (KieScanner find out new module after pollingInterval + 200ms).

Version-Release number of selected component (if applicable):
Pull request #277 submited in Drools.

How reproducible:
Drools 6.0.0-SNAPSHOT
Drools 6.0.0.ER4

Steps to Reproduce:
1. Write a test with KieScanner for specific KieContainer. Deploy artifact with module containing some rule. Start KieScanner with some pollingInterval. Check that KieSession from kiecontainer works with rule. 
2. Deploy artifact with module containing some other rule. Find out a time when kieSession works with new rule.
3. Run test.

Actual results:
Delay of KieScanner is more than 200ms.

Expected results:
Delay of KieScanner should be less than 200ms.

Additional info:

Comment 2 Mario Fusco 2013-11-22 14:16:54 UTC
I believe the test is wrong because the timer is started before deploying the new artifact into the maven repository while in my opinion it should start after that. Doing so the test succeeds as expected.

Moreover running this test made me discover a regression that has been caused by the introduction of incremental compilation. This issue didn't exist (as the incremental compilation feature) when this ticket has been opened. I reported this problem here https://bugzilla.redhat.com/show_bug.cgi?id=1033612 and already fixed it.

Comment 3 Tomas David 2013-11-25 09:41:12 UTC
So "kieScanner.start(500)" means:
After deploying the new artifact into the maven repository, kieScanner waits 500ms and then kieSession works with new artifact?

I thought that kieScanner checks if there is some new artifact every 500ms from start.

Comment 4 Mario Fusco 2013-11-27 16:45:35 UTC
No, but starting the timer before the deploy means that you're also counting the time consumed by the deployment process and this is way the final result is greater than expected.

Comment 5 Tomas David 2014-01-10 09:14:04 UTC
Thank you. I updated my tests.

Verified on BRMS 6.0.0.ER7.


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