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:
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.
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.
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.
Thank you. I updated my tests. Verified on BRMS 6.0.0.ER7.