-
Notifications
You must be signed in to change notification settings - Fork 55
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
Some modifications #19
Conversation
@@ -46,12 +46,22 @@ def emit_logfiles(agents2procs, level='warn', max_lines=100): | |||
""" | |||
emit = getattr(log, level) | |||
for ua, proc in agents2procs: | |||
i=5 |
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.
For one I'd just use a range(5)
here instead of the while
loop.
@fchareyron Can you explain how this helps?
As far as I remember stderr
capture should be synchronous so it shouldn't make any difference how long you wait? Maybe you found something else in your use?
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.
In fact, I do not know if the loop is useful. As the occurrence of exceptions is rare, I do not know under what conditions they occur. The loop gives some time to STREAM to be created, but perhaps instead it is already destroyed, or will not be built.
With this change, the exceptions have disappeared.
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.
@fchareyron ok so I would revert these changes outright since they really aren't solving any problem that I know of.
The stderr getting logged, even if blank, is fine and often helpful when debugging SIPp
itself.
@fchareyron As a starting point you should make sure all the unit tests pass. You can run the tests using |
test_stack.py::test_unreachable_uas[autolocalsocks=False] the patch delays the stopping process of the remaining ua in a pair, whe, the other ua dies quickly.
@fchareyron to delete a file with git see git-rm. You can delete the duplicate I agree that the In summary I think the only acceptable changes in this patch set are those made to For your main changes these are my justifications for why they aren't necessary:
If you can revert all the changes except for Let me know what you prefer. |
I agree, it is not a good idea to to add a static sleep into the code But I do not agree on the cause of the problem. I do not think SIPp I don't agree also with your proposal to only keep command.py modifications. Without fixes proposed in init.py and agent.py at line 127, the In report.py, you focus on the loop, and I agree, it is probably not I don't use git, so I don't know what to rebase. So please, add the Le 26/07/2016 à 19:50, goodboy a écrit :
|
@fchareyron Alright I think we can find a compromise.
The test is relevant it checks that the number of expected files are generated. You added back the
Agreed that this is a bug but I don't believe you change solves it fully. Testing this manually I get: >>> next(pysipp.walk('./scens/', logdir='/var/tmp'))[1].logdir
'/tmp' Which shows that the
The fix you propose calls |
@fchareyron I will include both fixes since you are right that the |
@fchareyron I've merge the agreed upon changes to master in f888d3c. As long as you don't think we need to open any further issues (notably that you wanted the Thanks! |
Hi Le 28/07/2016 à 20:22, goodboy a écrit :
The output streams are manage by RobotFramework. It is probably possible
|
Please, do it! Le 28/07/2016 à 20:32, goodboy a écrit :
|
OK Le 28/07/2016 à 21:04, goodboy a écrit :
|
Hello You did not include a part of the fix of the logdir issue. Did you miss In agent.py at line 130, the provided file name contained in attr is prefix all log file paths
*attr or *"{}_{}".format(self.name, name)) Best regards Frederic Le 29/07/2016 à 11:43, CHAREYRON Frederic a écrit :
|
@fchareyron I feel like I somehow missed it. |
Hello, if created #23 xxx_file is not respected in defaults Best regards Le 29/08/2016 à 21:54, goodboy a écrit :
|
Hi
I join a patch file including some needed modifications to use pysipp properly in my software.
In command.py, some missing SIPp parameters.
In agent.py and init.py, some modifications to handle properly the log dir and to generate error log file.
In report.py, some modifications to avoid seldom exception cases. For any reason, proc.streams.stderr doesn't exist when used.
I hope it's useful enough to be included in the product.
Regards
Frederic