eugeniy / pytest-tornado

A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications.
Apache License 2.0
121 stars 34 forks source link

Fix the test hangs when running with tornado.process.Subprocess #35

Closed yen3 closed 4 years ago

yen3 commented 6 years ago

HI eugeniy,

Thanks for your development. The plugin is very helpful for me to test tornado program.

When I try to run some test with torando.process.Subprocess, the test would hang and timeout. The original tornado.testing module has no such problem. I found the problem can be resolved by adding the line so I add the line and write some tests to make the plugin is workable for all testcases.

Ref: https://github.com/tornadoweb/tornado/blob/master/tornado/testing.py#L224

eugeniy commented 6 years ago

Hi @yen3, thanks! Looks like some tests in the CI are hanging after this fix. Can you see what's causing it?

yen3 commented 6 years ago

Hi @eugeniy, I will see what happens for these tests in the recent day. Thanks for your reply.

yen3 commented 6 years ago

I am sorry I can not reproduce the same result in my Mac OSX with the same pytest. tornado and python versions. The same point of two hang configs are pytest == 2.8.6 (tornado and python versions are different). I would try to run the test under linux environment.

If the final result is still unstable, I have no idea about the problem. Maybe you can reject the patch considering the stability of the plugin.