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

improvements in example-msg-generator #2565

Merged
merged 2 commits into from Feb 22, 2019
Merged

Conversation

nobles
Copy link
Contributor

@nobles nobles commented Feb 22, 2019

In this patch I added two changes to example-msg-generator. With these changes, example-msg-generator can be used for testing purposes easier.

  • First message is sent immediately: we do not need to wait freq. With this, the tests can speed up.
  • With the new num option, users can limit how many messages should be generated. Zero means infinite messages (this is the default). Positive integer means the maximum number of messages.

Example:

source { example-msg-generator(freq(1) num(5)); };

Signed-off-by: Terez Nemes <terez.noble@gmail.com>
@kira-syslogng
Copy link
Contributor

This user does not have permission to start the build. Can one of the admins verify this patch and start the build?
(admin: you have the next options (make sure you checked the code):
"ok to test" to accept this pull request (and further changes) for testing
"test this please" for a one time test run
do nothing -> CI won't start)

1 similar comment
@kira-syslogng
Copy link
Contributor

This user does not have permission to start the build. Can one of the admins verify this patch and start the build?
(admin: you have the next options (make sure you checked the code):
"ok to test" to accept this pull request (and further changes) for testing
"test this please" for a one time test run
do nothing -> CI won't start)

@furiel
Copy link
Collaborator

furiel commented Feb 22, 2019

@kira-syslogng ok to test

Copy link
Collaborator

@Kokan Kokan left a comment

Choose a reason for hiding this comment

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

Would you consider changing the num behavior where there is no way to configure msg generator not to send messages (num(0)). I would define num(0) as infinite number of messages, and use that as a default value. (negative number to produce infinite number of messages would be fine)

Using zero as infinite in configuration not so uncommon.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

Signed-off-by: Terez Nemes <terez.noble@gmail.com>
@kira-syslogng
Copy link
Contributor

Build SUCCESS

Copy link
Collaborator

@gaborznagy gaborznagy left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@Kokan Kokan merged commit bbf7978 into syslog-ng:master Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-visible-feature User visible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants