-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix: Make sure to use current pid to verify Camel app status #1284
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello and thanks for the attempted fix. there are probably differences in local execution vs pipeline. this currently doesn't run: https://github.com/citrusframework/citrus/pull/1284/checks#step:6:54177.
additionally, I've left one remark on your code.
try { | ||
Thread.sleep(delayBetweenAttempts); | ||
} catch (InterruptedException e) { | ||
logger.warn("Interrupted while waiting for Camel integration '%s' first log".formatted(name), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.warn("Interrupted while waiting for Camel integration '%s' first log".formatted(name), e); | |
logger.warn("Interrupted while waiting for Camel integration '{}' first log", name, e); |
please use the logger
-internal formatting.
I have created another branch with potential fix: https://github.com/citrusframework/citrus/tree/fix_pid_camel_jbang_run @gansheer can you please checkout this branch and see if the fix works on your machine? I have added some logic in the Camel JBang verification test action to also look for descendant process ids. PR is here: #1285 Let's see what GH actions results do report for this fix |
- Auto adjust the pid that identifies the running Camel JBang application - Camel JBang pid may change on Unix OS due to descendant process being launched - Racing conditions may lead to parent pid being stored in test context - Make sure to also search for descendant process ids when verifying the Camel integration app status
efcf482
to
bdae2d8
Compare
Merged as part of #1286. |
Bug
The integration tests
org.citrusframework.camel.yaml.JBangTest.shouldLoadCamelActions
andorg.citrusframework.camel.xml.JBangTest.shouldLoadCamelActions
fails on my local environement.The Camel Jbang CamelRunIntegrationAction sets the wrong process pid from a temporary descendant process in the context. This descendant process is not the Camel Jbang run process. When the CamelVerifyIntegrationAction use the pid from the context object and keeps waiting for the integration process to be Running.
The descendant process is not active very long.
Fix