Skip to content
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

[WIP] Travis enh: fix coverage mess with test_bad_start #45

Closed
wants to merge 3 commits into from

Conversation

gst
Copy link
Contributor

@gst gst commented Jun 2, 2015

so to shutdown an annoying prob during coverage :

test_port_not_free (test_bad_start.Test_Scheduler_Bad_Start) ... ok
Coverage.py warning: No data was collected.
Traceback (most recent call last):
File "/opt/python/2.6.9/lib/python2.6/multiprocessing/util.py", line 235, in _run_finalizers
finalizer()
File "/opt/python/2.6.9/lib/python2.6/multiprocessing/util.py", line 174, in call
res = self._callback(_self._args, *_self._kwargs)
File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/cov_core.py", line 20, in multiprocessing_finish
cov.save()
File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/control.py", line 493, in save
self.data.write(suffix=data_suffix)
File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/data.py", line 91, in write
self.write_file(filename)
File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/data.py", line 131, in write_file
fdata = open(filename, 'wb')
IOError: [Errno 2] No such file or directory: '/tmp/tmpOumlg1/.coverage.testing-worker-linux-027f0490-2-7771-linux-4-50667445.3028.493619'

@gst gst changed the title Travis help: explicitely require cov-core==1.15.0 and nose==1.3.6 Travis enh: explicitely require cov-core==1.15.0 and nose==1.3.6 Jun 2, 2015
@gst gst changed the title Travis enh: explicitely require cov-core==1.15.0 and nose==1.3.6 [WIP] Travis enh: explicitely require cov-core==1.15.0 and nose==1.3.6 Jun 2, 2015
@gst
Copy link
Contributor Author

gst commented Jun 2, 2015

don't merge already..

@gst gst changed the title [WIP] Travis enh: explicitely require cov-core==1.15.0 and nose==1.3.6 [WIP] Travis enh: clean coverage miss with test_bad_start Jun 2, 2015
@gst gst changed the title [WIP] Travis enh: clean coverage miss with test_bad_start [WIP] Travis enh: fix coverage mess with test_bad_start Jun 2, 2015
Actually the http_daemon thread was ran as a "daemon-thread" :
once sys.exit() is called the thread is also exited.

but depending on the conditions the sys.exit() may NOT be called, or not directly,
leading to delayed / longer time for the daemon to exit.

It's better to pro-actively check our "interrupted" flag by/in this thread itself.

Also make sure to join the childs/clients threads at the end of the http_thread.
@gst gst force-pushed the fix_test_prob_coverage branch 2 times, most recently from 55c72eb to b8ca4b3 Compare June 3, 2015 20:30
Grégory Starck added 2 commits June 3, 2015 17:21
more a workaround for now.

we should effectively "simply" join the http_daemon thread(s).
so to shutdown annoying prob during coverage :

test_port_not_free (test_bad_start.Test_Scheduler_Bad_Start) ... ok
Coverage.py warning: No data was collected.
Traceback (most recent call last):
  File "/opt/python/2.6.9/lib/python2.6/multiprocessing/util.py", line 235, in _run_finalizers
    finalizer()
  File "/opt/python/2.6.9/lib/python2.6/multiprocessing/util.py", line 174, in __call__
    res = self._callback(*self._args, **self._kwargs)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/cov_core.py", line 20, in multiprocessing_finish
    cov.save()
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/control.py", line 493, in save
    self.data.write(suffix=data_suffix)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/data.py", line 91, in write
    self.write_file(filename)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/coverage/data.py", line 131, in write_file
    fdata = open(filename, 'wb')
IOError: [Errno 2] No such file or directory: '/tmp/tmpOumlg1/.coverage.testing-worker-linux-027f0490-2-7771-linux-4-50667445.3028.493619'
@gst
Copy link
Contributor Author

gst commented Jun 9, 2015

better done by #62 and #63

@gst gst closed this Jun 9, 2015
@gst gst deleted the fix_test_prob_coverage branch June 9, 2015 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant