-
Notifications
You must be signed in to change notification settings - Fork 395
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
xunit vs multiprocess #2
Comments
Any update to this issue? I would love to see a fix soon as this issue is plaguing me. Google Code Info: |
I don't have time to work on nose myself right now, but would happily accept a patch (with tests) that fixes this issue. Google Code Info: |
I wish I had the knowledge to fix it myself. Google Code Info: |
I was able to do a quick fix using multiprocessing.Queue and multiprocessing.Array to manage passing data across the processes. Because the multiprocess plugin also uses the python multiprocessing module, this seemed like the most natural extension. In order for this work, the xunit plugin also needs to be loaded into each new process, this is currently not being done in the mulitprocess plugin. I'm attaching two files: a new multiprocess plugin and xunit plugin called Xunitmp: The multiprocess plugin also fixes the timeouts, generator issues as covered in Issue 399: http://code.google.com/p/python-nose/issues/detail?id=399 The Xunitmp plugin can be enabled with --with-xunitmp The only disadvantage here is that the queues are global variables. I don't think this will be a problem... rosen diankov, Google Code Info: |
I'm attaching a new version of xunitmultiprocess.py that accurately measures the timings. rosen diankov, Google Code Info: |
Google Code Info: |
I'm attaching a new version of xunitmultiprocess After doing a little more testing, it became clear that multiprocessing.Manager is a better alternative than multiprocessing.Queue since it doesn't block on exiting processes. I also made it play nicer with the Capture plugin, now it will fill the XML tags instead of embedding it into the error stream. Google Code Info: |
Please get the latest xunitmultiprocess.py from: https://openrave.svn.sourceforge.net/svnroot/openrave/trunk/test/noseplugins/xunitmultiprocess.py In order to use it with the new multiprocess.py, have to do: multiprocess._instantiate_plugins = [xunitmultiprocess.Xunitmp] Google Code Info: |
Rosen: I'm glad to see you're using Manager.Queue rather than the raw Queue. It's troubling to see coupling between the multiprocess and xunit plugins. They shouldn't need to be aware of each other. Earlier, I added a fix to the plugintest plugin which may have some bearing here. The cleanest solution was to always use multiprocessing-aware interface whenever the the multiprocessing module was available. This meant that the plugintest system didn't need to be aware of the multiprocess plugin, and vice versa. It would continue to "just work" regardless of whether multiprocessing was used or not. Would an analogous approach be useful here? Google Code Info: |
does the new multiprocess code already address this issue? Some (maybe all) of the patches here have been applied already in Issue 399 Google Code Info: |
I tried it today but the problem is still there and was not fixed by Issue 399. As far as I understand it after trying a few things each test process creates its own Google Code Info: |
Ok, I see now why you need to add things in the multiprocess plugin, I thought the multiprocessing module worked differently. Google Code Info: |
What's the status of this bug? I do see lots of updates in mp. |
I'm trying the use of Rosen's plugin for some of my integration tests. The first problem I had was that its options --xunit-file conflicts with xunit plugin's option of the same name. So I changed Rosen's plugin to have --xml-file instead and got it working. Secondly, my tests do not have an attribute capturedOutput which the plugin refers to:
I've commented out the if condition for now and kicked off a run. Will report back any issues I see. Would love to very much see this plugin/ this issue fixed. The multiprocess runs saved 1/3rd of our run time. Would it be hard to just have xunit plugin send each of its run reports into a seperate file? say moduleName-report.xml? Because this is how unittest-xml-reporting splits the xUnit style reports and they are rendered fine by jenkins CI. Also - anyone actively working on this issue? |
Ok the xunitmp plugin works for me on my setup. I've been able to run tests in parallel again. Any chance of it being merged with nose mainline? I'm happy to provide any testing data if reqd. |
The nose version I am using the plugin with is 1.2.1 $nosetests -p |
ok - i'm back. there seem to be a couple of problems with the xunitmp plugin
nose.plugins.multiprocess: ERROR: Worker 1 error running test or returning results |
Oooh. That looks like |
Hey guys I think I am having the same problem. When I run I always get the following output in my xml file. It looks like my tests are being run in parallel but the xml file is always like that. Is this the same problem you guys are having? |
@donald-ngo Yup. That's the problem. |
Is there a way we can vote on this? processes gives us a huge speed up, but having no xunit output blows when the build fails. |
I will gladly vote to get this fixed |
+1, would be nice to have this fixed in the upcoming release. Prasanna., From: Donald Ngo [mailto:notifications@github.com] I will gladly vote to get this fixed — |
Also vote to get this issue fixed |
+1, critical for builds with very large numbers of tests |
I was asked to join github just to vote for this issue being fixed. This has a very negative effect on our CI. |
+1 for getting this fixed. I'll happily buy dinner for whoever takes on this. |
+1 for fix this issue, would be a great milestone for large tests batteries runners! |
Hi, don't mean to nag, but I am just curious if this is actively being worked on by someone. Thanks for any info! |
@kahunacohen Not that I know of. For one, that's a particular hard area of nose to work with. Second, I think most of the maintainers (including myself) having a growing interest in Nose 2. I'm not sure what changes need to be made to use Nose 2 (I haven't dived deeply into it just yet), but it does support multiple processes. |
https://pypi.python.org/pypi/nose_xunitmp/0.2 - works on my machine certified |
Thanks Ignas!!!!!!!!!!!!!! |
Thanks!!! |
I'm using the xunitmp plugin and still is not working :( |
Well, you should probably complain about that in xunitmp github, with details like nose version, operating system and what is failing, and not here... |
Thanks Ignas, that's really helpful. |
Any plan about fixing this problem in the main nose distribution? |
@crusaderky If you'd like to see this fixed, I suggest putting together a PR to fix it. It's not likely to climb up the list otherwise. I'd also suggest taking a look at Nose 2. It's really the future of Nose, and it has both JUnit XML support and MP support. |
nose2 hasn't gained much traction. I've stuck with nose1 after trying out On Wed, Jan 28, 2015 at 6:09 AM, John Szakmeister notifications@github.com
|
It won't unless more people use it, and more importantly, help oout.
None taken. OTOH, Nose will go away at some point. It's pretty crufty as it stands, and fixing some issues would require breaking plugins. Others, such as the multiprocessing brokeness, can only be fixed with some significant effort and likely a number of architecture changes--and I apologize, but it's more time than I can commit to. So at the end of the day, Nose only grows harder to maintain with time--and quite frankly, with all the stuff I've got going on right now, I'm seriously considering dropping out of the open source scene for a while. Nose 2 is really where the attention needs to be. |
I agree that it's up to users to move nose forward, but at the same time if On Wed, Jan 28, 2015 at 8:35 AM, John Szakmeister notifications@github.com
|
any idea if its fixed or does it work in nose2 now? or --with-xunit & --processes are still not compatible for any of nose version? However, @jpellerin : thanks for the great help 👍 xunitmp comes as rescue |
i use nose 1.3.7 inside a virtualenv where install junit_xml==1.6 and nose_xunitmp==0.4.0 and then i can successfully run: The process timeout is necessary because the default value is ridiculously low |
What steps will reproduce the problem?
What is the expected output? What do you see instead?
All of nose's tests should pass under --processes=2
Please use labels and text to provide additional information.
Problem is, xunit creates a file and writes to it when it sees reportable events. For that to work
under mp, all the reporting has to happen in the main process. That will require a major redesign of
how mp worker processes report their results to the main process.
Google Code Info:
Issue #: 267
Author: jpelle...@gmail.com
Created On: 2009-05-16T13:04:45.000Z
Closed On:
The text was updated successfully, but these errors were encountered: