Bug 1025296 - Delay of KieScanner is more than expected
Delay of KieScanner is more than expected
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: ER6
: 6.0.0
Assigned To: Mario Fusco
Tomas David
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-31 08:23 EDT by Tomas David
Modified: 2014-08-06 16:17 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:17:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas David 2013-10-31 08:23:56 EDT
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 09:16:54 EST
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 04:41:12 EST
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 11:45:35 EST
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 04:14:04 EST
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.