-
Notifications
You must be signed in to change notification settings - Fork 642
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
Allow waiting for a specific number of log occurences #628
Comments
+1 |
looks useful to me. We still would have to think about to introduce the configuration. Simply Ideally we would have something like: <wait>
<log>
<pattern>database system is ready to accept connections</pattern>
<count>2</count>
</log>
</wait> however |
Another idea would be to allow multi-line patterns: When the multiline option is enabled in the pattern Kudos to @michael-simons for the idea ;-) |
This is related to fabric8io#628 and fabric8io#608 and should fix both issues. Also, some refactoring has been performed for the wait checkers which were extracted into an extra package.
@miszobi @who I just added multi line matching now, so that you can now wait on this condition like with
for happening this line twice. I think this will perfectly fit your use case and is more flexible then a count (and also doesn't require any extension to the log configuration). If this is good enough for you I would like to close this issue. |
@rhuss using a multi-line pattern for this sounds like a good solution to me. Thanks a lot! |
Looks good to me! It should solve our particular use case. |
Awesome ;-). You can expect a release tomorrow :) |
This is related to fabric8io#628 and fabric8io#608 and should fix both issues. Also, some refactoring has been performed for the wait checkers which were extracted into an extra package.
It works fine in 0.24.0 but broken in 0.25.2 for me. It just stop and waiting on a pattern line
|
Description
Info
mvn -v
) : 3.3.9Some containers (observed both with postgres:9.5 for example) emit a log message indicating readiness multiple times (probably the db is restarted after initial env setup I assume).
Example:
For such cases it would be useful to specify that the plugin should wait for a specific number of occurences of the specified log message pattern.
Something like:
would wait for the second occurrence of the pattern before continuing. This seems it would solve #608 as well.
The text was updated successfully, but these errors were encountered: