dalekjs / dalek

[unmaintained] DalekJS Base framework
MIT License
695 stars 63 forks source link

Dalek CLI not exiting after tests complete on Ubuntu #143

Open alihen opened 9 years ago

alihen commented 9 years ago

I've been having an issue with the Dalek CLI not exiting after tests have run on Ubuntu. After the test completes, it hangs for a few minutes and then throws a ERROR: Error: socket hang up and then exits the test.

Below is the output of the test: Note: The test is being called on a remote host.

Running tests
Running Browser: Google Chrome
OS: Windows NT 6.1 SP1 x86
Browser Version: 37.0.2062.124

RUNNING TEST - "Express Test"
▶ OPEN http://www.example.com/
▶ WAITFOR
▶ OPEN http://www.example.com/express/
▶ WAITFOR
▶ CLICK #selector[value="137545"]
▶ WAITFOR
▶ WAIT 500 ms
✔ VAL Exists
▶ CLICK #selector
▶ WAITFOR Interrupted by timeout
▶ WAIT 500 ms
✔ TEXT exists
✔ EXISTS The button exists
▶ CLICK #button
▶ WAITFOR
▶ WAIT 1500 ms
✔ TITLE Page Reached
✔ 4 Assertions run
✔ TEST - "Express Test" SUCCEEDED
 4/4 assertions passed. Elapsed Time: 18.35 sec
//Delay of a couple of minutes
>> ERROR: Error: socket hang up
>> ERROR: Error: socket hang up

I also get an error in the Dalek remote host command prompt.

Starting session:...
Closing session:...
>>ERROR: connect ECONNREFUSED
>> ERROR: Error: socket hang up
//Delay of a couple of minutes
Closing session:...

I've tested this on Ubuntu 14.04 and 12.04.4 LTS and have had the same problem on both. The tests work fine on OS X. There are quite a few WaitFor calls (for dom ready) - could this be the issue? Really hoping there would be a built in call for this.

Dalek CLI Version: 0.0.4 Dalek Version: 0.0.8

asciidisco commented 9 years ago

Phew, quite some effort to reproduce this. Maybe this is related to the way Dalek shuts down browsers in Windows environments. Could be the same bug as described here: https://github.com/dalekjs/dalek-browser-chrome/issues/1