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-drools-6093] flaky test: org.drools.compiler.integrati… #6096

Conversation

tkobayas
Copy link
Contributor

@tkobayas tkobayas force-pushed the incubator-kie-drools-6093-flaky-TimerAndCalendarFireUntilHaltTest-fix branch from 2aabeee to 4f44b28 Compare September 20, 2024 09:49
@tkobayas tkobayas marked this pull request as ready for review September 20, 2024 09:49
@tkobayas
Copy link
Contributor Author

Draft PR to be used for investigation: #6095

Comment on lines 111 to +115
activateRule();
advanceTimerOneSecond();

await().until(ruleHasFired("TimerRule", 1));

advanceTimerOneSecond();
await().until(ruleHasFired("TimerRule", 2));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The flakiness was that fireUntilHalt may or may not fire a match between activateRule() and advanceTimerOneSecond(). Usually, it doesn't fire, so the assertion worked with ruleHasFired("TimerRule", 1). However, to be stable, the test has to wait the first firing before advanceTimerOneSecond(). So the subsequent assertions are changed accordingly.

advanceTimerOneSecond();
await().until(ruleHasFired("TimerRule", 2));

stopEngine();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This stopEngine is not related to the issue. But make sure to clean up.

@mariofusco mariofusco merged commit 4675dab into apache:main Sep 23, 2024
9 of 19 checks passed
tkobayas added a commit to tkobayas/drools that referenced this pull request Sep 25, 2024
tkobayas added a commit that referenced this pull request Sep 25, 2024
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Oct 3, 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.

2 participants