Commit Graph

38 Commits

Author SHA1 Message Date
Mike Place
c4393d5e9e
Address transport test hang
It would appear that if an attribute error is raised when trying to detect a class atter,
that the test suite does not run the class teardown method but continues regardless. This
fixes the class attr error which then allows the teardown to run. Prior to this, if the
teardown did not run, the entire suite would hang out shutdown because it was blocked
on waiting for a ioloop to terminate.
2016-10-25 13:16:35 +09:00
Nicole Thomas
d7e28d24a4 Pylint fix for 2016.3 (#37186)
Refs #37175
2016-10-24 09:42:41 -06:00
Mike Place
0fecb5ff2e
Remove sleep. Thanks @s0undt3ch 2016-10-24 18:38:49 +09:00
Mike Place
cedc609503
Fix test suite hang on salt testing
We don't need to clean up here since the test suite will handle it for us.
2016-10-24 15:52:33 +09:00
Justin Anderson
28ba98c613 Skip some tests related to #32902 (#32995) 2016-05-03 08:55:23 -07:00
Justin Findlay
e46bac2d98 transport.tcp unit tests: disable hanging tests 2016-03-10 10:57:21 -07:00
justinta89
fd0dedeb99 Skipping Async tests
Skipping the transport async tests until we can devote more time to fixing the
test failures associated with them.
2015-09-24 13:41:58 -06:00
Mike Place
57b78d369a Make the testing ioloop the current one
Otherwise, loops from previous intefere and cause stacktraces on ioloop init
2015-09-03 13:28:28 -06:00
Mike Place
8faa49a226 IPC transport skeleton
Basic IPC server works!

Lint

Skeleton of client

IPC bind test

Make stand-alone

Adding factories for push and pull channels

Allowing opts passing for consistency

Tests now (mostly) work

Lint

Method documentation

General cleanup. Migrate to inheritence.

Log cleanup

Migrate framing to stand-along module

Migrate ipc.py to new framer

Working except for serialization bug

Debugging

Debugging

It works!!

Remove ZeroMQ from TCP transport :]

General cleanup

Linting

General cleanup

Align socket name with what client expects

Remove unused buffer size flag

exception handling for stream close

Calls to parent class inits

Docs

Remove debugging

Remove unused function

Remove unnecessary pre/post fork on msgclient

Remove unecessary timeout flag

Better stream/socket shutdown in server

Remove unused handler

Removing more unused

More function cleanup

Removing more unneeded cruft

Lint

Round out documentation

More docs

Misc hacks to fix up @cachedout's IPC

This was using a mix of blocking and non-blocking calls, which was making a bit of a mess. connect and write are both non-blocking calls on IOStreams, so we either need to handle all the callbacks or do them in the coroutine fashion (much easier to manage). This meant that in the tests your "write" wouldn't make it out since we didn't wait on the connect.

IMO we should refactor this IPC stuff to have proper async interfaces and wrap if absolutely necessary, but I think its reasonable to ask that as part of this we make some more of the core coroutines :)

for #23236

Lint

Remove init of io_loop because we require start()

Various fixes

Remove uneeded functionality

Remove dup

Cleanup and remove unused functions

Moving toward coroutines

More lint

handle_connection changed to spawn

Singletons for ipcclient

Lint disable

Remove redundent check in close()

Remove duplicates in init

Improved exception handling

Test framework

Require sock path to be passed in

Better testing approach

Remove unecessary __init__

Misc cleanup of unecessary methods

Major rework of the IPC channels to make them work :)

Remove TODO, since the feature was implemented

Add more tests for IPC

Add support for reconnecting clients, as well as a return from the IPCServer

misc cleanup

Lint test case

Lint transport
2015-07-14 08:47:09 -06:00
Mike Place
69b9f1781c Revert zmq test experiment 2015-06-30 14:38:31 -06:00
Mike Place
8a5caf02c2 Change pub test to return global ioloop instance
This *could* be causing the intermetent failures on
unit.transport.zeromq_test.AsyncPubChannelTest.test_basic but it
is a bit of a shot in the dark.
2015-06-30 13:37:03 -06:00
Mike Place
72752f53ff Fix failing zmq tests
This is just a stopgap to prevent the ioloop from shutting down before the procs die off.
2015-06-18 11:45:57 -06:00
rallytime
63c3ada4fd Python 3 Compat for new transport files 2015-04-14 09:16:42 -06:00
Thomas Jackson
435fc7ba61 Add some support pyzmq 13.0.x
pyzmq 13.0.x was the first version to support *any* tornado in pyzmq, and since 14.0.x they have changed the API (IMO into a more sensible one). This conditionally changes the name to match the new API's naming
2015-04-13 17:43:45 -07:00
Thomas Jackson
66016ed132 pylint 2015-04-10 09:40:26 -07:00
Thomas Jackson
8ff37b34b8 Check for FDs attached to the IOLoops after test runs 2015-04-10 09:40:26 -07:00
Thomas Jackson
f07840fb12 pylint cleanup 2015-04-08 08:20:03 -07:00
Thomas Jackson
10ec3343ae pylint cleanup 2015-04-08 08:10:52 -07:00
Thomas Jackson
2683843bdf pylint cleanup 2015-04-08 08:04:45 -07:00
Thomas Jackson
cc06dd620d Pylint 2015-04-08 08:04:02 -07:00
Thomas Jackson
bf97e8c16f Make sure to close server processes after each test.
Waiting for the destructor doesn't necessarily work, since its not gauranteed to run immediately.
2015-04-07 21:25:53 -07:00
Thomas Jackson
cb02d0e021 Remove "close()" api-- just use a destructor 2015-04-07 21:01:43 -07:00
Thomas Jackson
d87c62b453 Make transport unit tests pull configs from test suite instead of from /etc/salt 2015-04-07 21:01:42 -07:00
Thomas Jackson
e17824a0b1 Change _handle_payload to return a future.
This means we can make more and more of the core async (using coroutines) without having to change the transport modules-- as they all already expect futures.
2015-04-07 21:01:15 -07:00
Thomas Jackson
98842a86da Fix zmq pub channels 2015-04-07 20:53:29 -07:00
Thomas Jackson
e89da4e26b Make AsyncAuth singleton per io_loop
In addition this makes the singleton instance mapping use weakrefs-- so if the io_loop goes away (or we don't reference the object anywhere) we will remove the auth instance. This allows for us to "unload" an auth without having to exit the interpreter or forcibly delete it
2015-04-07 20:53:28 -07:00
Thomas Jackson
c6245c869e Reset asyncauth singleton in tests 2015-04-07 20:53:28 -07:00
Thomas Jackson
30f9d37909 Merge cleanup 2015-04-07 20:53:28 -07:00
Thomas Jackson
540710c1c3 Cleanup shutdown of tests 2015-04-07 20:53:27 -07:00
Thomas Jackson
b1ca45dcee Refactor pub tests 2015-04-07 20:53:27 -07:00
Thomas Jackson
2ce0582991 Add unregister tests 2015-04-07 20:53:27 -07:00
Thomas Jackson
9ec426bdb2 Add basic Asyncpubchannel tests to zmq 2015-04-07 20:53:27 -07:00
Thomas Jackson
bfeb3bf7f1 Misc cleanup to get the minion to use async sign_in 2015-04-07 20:53:26 -07:00
Thomas Jackson
6ab5da87c4 Cleanup async 2015-04-07 20:53:26 -07:00
Thomas Jackson
de26e7eae2 Handle timeouts in auth/pub connect 2015-04-07 20:53:26 -07:00
Thomas Jackson
8c7ee3109d Begin work on async auth/pub/req channels.
For a while we'll have to maintin sync and async versions. The plan is to replace the sync ones with wraps around the async ones.
2015-04-07 20:53:26 -07:00
Thomas Jackson
1a88eeeed4 Add basic Pub channel tests 2015-04-07 20:53:26 -07:00
Thomas Jackson
d619dfbf96 Add initial req_channel tests 2015-04-07 20:53:26 -07:00