LiTiang / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Eclipse GUI freezes while tests run. #304

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a slow running test inside a sample application. Slow running .js 
file is attached to this issue.
2. Run the test. 

What is the expected output? What do you see instead?
Eclipse GUI should respond to user actions while tests run. It should be 
possible to move it around the screen, open files and so on. 

Instead, Eclipse becomes unresponsive. After a while, its title shows system 
message "(Not Responding)".

What version of the product are you using? On what operating system?
trunk

Please provide any additional information below.

Original issue reported on code.google.com by m.jurcov...@gmail.com on 4 Dec 2011 at 11:19

Attachments:

GoogleCodeExporter commented 9 years ago
The attached patch fixes this. 

Eclipse freezes because js-test-driver tests have been 
Display.getDefault().asyncExec(...). Display.asyncExec always runs in GUI 
thread. If it contains a long running operation, Eclipse GUI freeze.

The patch moves tests runner into Eclipse job scheduler. Job scheduler always 
runs in a separate thread. Only GUI operations are now encapsulated in 
Display.asyncExec.

Note: the patch fixes also issue 303.

Original comment by m.jurcov...@gmail.com on 4 Dec 2011 at 11:22

Attachments:

GoogleCodeExporter commented 9 years ago
Huh. Didn't know that existed. Awesome. Patch applied at r1097

Original comment by corbinrs...@gmail.com on 5 Dec 2011 at 1:50

GoogleCodeExporter commented 9 years ago
Hi,

the file 
com.google.eclipse.javascript.jstestdriver.ui.launch.EclipseTestRunnerJobEclipse
TestRunnerJob.EclipseTestRunnerJob seems to be missing from the trunk. It is a 
new file, your svn commit probably ignored that one :).

Original comment by m.jurcov...@gmail.com on 5 Dec 2011 at 1:50