cesium-ml / cesium

Machine Learning Time-Series Platform
Other
671 stars 101 forks source link

Add frontend tests #53

Closed acrellin closed 9 years ago

stefanv commented 9 years ago

Thanks, @acrellin!

I see the following:

PASS 11 tests executed in 51.833s, 11 passed, 0 failed, 0 dubious, 0 skipped.   

Is that the right nr of tests?

Then, also a bunch of the following:

[debug] [phantom] Navigation requested: url=http://localhost:5000/, type=Other, willNavigate=true, isMainFrame=true
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49067)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 657, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 716, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 283, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

Any idea where those are from or what they mean?

stefanv commented 9 years ago

Subsequent test run:

FAIL 10 tests executed in 65.103s, 6 passed, 4 failed, 0 dubious, 0 skipped.    

Details for the 4 failed tests:

In mltsp/tests/frontend/02_featurize.js:83
  featurize
    assertTextExists: Featurization completed
In mltsp/tests/frontend/03_build_model.js:40
  build model
    assertTextExists: Model building completed
In mltsp/tests/frontend/04_predict.js
  predict
    uncaughtError: "This process is currently running" did not appear in the page in 5000ms
In mltsp/tests/frontend/06_delete_project.js
  delete project
    uncaughtError: "#editDeleteResultsDialog-okbtn" still did not exist in 5000ms
[info] [phantom] Done 5 steps in 5547ms
[info] [phantom] Done 5 steps in 5547ms
[info] [phantom] Done 5 steps in 5547ms
stefanv commented 9 years ago

Another run:

FAIL 11 tests executed in 51.825s, 10 passed, 1 failed, 0 dubious, 0 skipped.   

Details for the 1 failed test:

In mltsp/tests/frontend/02_featurize.js:83
  featurize
    assertTextExists: Featurization completed
[info] [phantom] Done 6 steps in 886ms
acrellin commented 9 years ago

Hmm, I'm getting all passes. Yes, 11 should be correct. I'll look into that Flask error. Thanks @stefanv

stefanv commented 9 years ago

Any idea why these are so finicky? Can you run the test suite a few times in a row?

acrellin commented 9 years ago

I'll try to pin down the inconsistent behavior

acrellin commented 9 years ago

I can confirm inconsistent results when running the tests multiple times in a row.... No idea what may be going on, but I'll look into it.

acrellin commented 9 years ago

@stefanv, I'm now getting consistent passes on successive runs - let me know if you are still encountering errors. The broken pipe message is common and often non-critical with Flask, especially during development (should be remedied with gunicorn/nginx in production).

stefanv commented 9 years ago

@acrellin That did it--thank you!