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
DM-12007 Add tests to display_firefly #8
Conversation
In case you haven't spotted it, don't forget the |
@timj thank you for pointing out about the
|
I can review. When you type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the name of the SConscript
file so that the tests now get run by scons
.
Is there any way to get the test to timeout quicker? The test currently takes 80 seconds for me.
pytest -Wd
is reporting a unclosed socket:
ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('140.252.32.219', 63026)>
d4250cd
to
b0a0024
Compare
b0a0024
to
26e4751
Compare
@stargaser I should have made it more obvious that I had already fixed the problem with the |
@timj apologies -- I was trying to squash the commits while leaving yours intact, but it didn't quite work. The original test took 80 seconds to timeout so I made a test that raises an exception faster -- then wanted to clean up. Thank you for reviewing and providing assistance! |
Ok. Great. I'm a bit concerned by the open socket left lying around. Maybe that's the timeout failing to close it in a finalize block. |
Did you look at the open socket issue? |
How does the open socket manifest itself? If the To close the socket, it seems to me that this would work:
Since the ticket branch has been merged, but the ticket is still open, can I go back to the ticket branch and add more commits to handle this properly? |
You can see the problem if you run |
You can reuse this branch and merge it again but it might be clearer to do it as |
@timj Another apology: somehow I missed your review completion comment where you pointed out the socket issue and the 80 seconds for timeout. The changes I made already to decrease the test time also took care of the socket issue. Upon further investigation, I did not have to change the test so drastically. If I create an Do you want me to add back in the test of creating an |
Ok. Good that this is resolved. I think a test with afw_display being used would be good. I'm not sure I understand why switching from port 8080 to port 80 fixes the open socket problem. |
Add a minimal import test to the package. Note: interactive user tests for all backends are in afw/tests/test_display.py
tests/
subdirectorytests/test_import.py
that imports the package, and attempts to connect to a nonexistent host to raise aws4py.websocket.HandshakeError
.tests/SConscript
file as described in the developer's guide.