Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 114047

Summary: allow junit test suite of current context to run with low process priority
Product: z_Archived Reporter: Mik Kersten <mik.kersten>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 CC: darin.eclipse, mlists
Version: 0.4Keywords: helpwanted
Target Milestone: ---   
Hardware: Other   
OS: other   
Whiteboard:

Description Mik Kersten CLA 2005-10-27 20:58:35 EDT
It would be very nice to have the JUnit and PDE JUnit launch configuration provide UI
for setting the process priority for the test execution.  This would make it possible
to keep working in Eclispe while a suite is running and facilitate continuous testing.

This
may be as straightforward as setting a VM option (that I'm unaware of), or the priority
level in the exec.  I realize that priority levels are different across OS's, but from
a UI point of view I think all we need is the ability to set it to Low (e.g. Low on Windows
and a high nice level on UNIX).
Comment 1 Dirk Baeumer CLA 2005-10-28 06:15:08 EDT
I see your point, however Java  doesn't provide API to change/set the process
priority nor does the VM allow to set it.

Moving to Debug since they own launching (which JUnit reuses) however I don't
see how to address this without providing platform specific natives.
Comment 2 Darin Wright CLA 2005-10-28 09:05:19 EDT
I agree it would be nice, but Java does not provide a way to set a priority on 
a spawned OS process. Currently no plans to write the platform specific 
natives.
Comment 3 Mik Kersten CLA 2005-11-30 22:22:51 EST
Moving to Mylar, which now has a custom JUnit launch configuration that dynamically creates a suite from your current task context.  It's nice to be able to run that frequently, but annoying when it stops you from being able to type ;)
Comment 4 Mik Kersten CLA 2005-12-05 15:50:49 EST
*** Bug 118692 has been marked as a duplicate of this bug. ***
Comment 5 Mik Kersten CLA 2006-01-23 13:58:09 EST
Consideragbly less of an issue with dual-core machines, but we should still leave this on the table.
Comment 6 Mik Kersten CLA 2006-02-02 15:19:45 EST
Some of the API listed here could be helpful: bug 109211
Comment 7 Eric Bodden CLA 2007-07-13 21:43:40 EDT
gets my vote as I am running into similar issues. However, I would suggest to make this generic, i.e. for any launch configuration. This should not be restricted to Mylyn or unit tests. The reason is that we often debug software with the JDT that runs some heavy-duty analyses. If I do not reduce the priority and debug on my laptop, it more or less freezes for a minute or so. Right now I always set the priority manually in the process explorer but having an option in eclipse would be way better.

In terms of implementation, could that here help?
http://jakarta.apache.org/commons/sandbox/exec/
Comment 8 Mik Kersten CLA 2007-07-16 21:10:24 EDT
While it would be helpful to Mylyn users, this isn't a Mylyn specific requests and without it being contributed by the community we will not be looking at it in the 3.0 cycle.  If someone is interested in a contribution it should probably go to Debug.  A good starting point is the work that David Saff did for continuous testing. 

http://svn.csail.mit.edu/continuoustesting/ct-eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitBaseLaunchConfiguration.java

Darin: are you interested in having this moved over to Debug?
Comment 9 Darin Wright CLA 2007-07-17 12:51:14 EDT
The work on exec looks interesting, but it looks like it does not exist yet. I would mark this bug as "won't fix" until the support exists (I agree it should be a generic feature in debug/launching). However, I was interested to see the support in 1.5 to retrieve the system environment from ProcessBuilder. We have platform specific code to generate environment variables. If we ever migrate the debug platform to 1.5, we will be able to get rid of our platform specific code :-)
Comment 10 Mik Kersten CLA 2007-07-17 15:40:09 EDT
Thanks Darin, makes sense.  However, I'd like to keep this bug open to indicate that there is a need for it and to encourage voting if there is additional interest, so we can keep it on the Mylyn side for now.
Comment 11 Sam Davis CLA 2014-01-16 14:48:28 EST
I don't think there is any need for this anymore. Please reopen if you disagree.