Commit Graph

55 Commits

Author SHA1 Message Date
Pedro Algarvio
503e050a75 Sometimes the event system is just too fast 2015-09-04 15:52:06 +01:00
Pedro Algarvio
2f40387290 Add test_event_single_wait_0_no_block_False test case 2015-09-03 19:54:57 +01:00
Pedro Algarvio
ae9c6c9cff Workaround wait=0 meaning a blocking call when non blocking is required 2015-09-03 18:06:43 +01:00
Pedro Algarvio
dc0fec3be3 Restore backwards compatibility to salt.utils.event
Fixes #26848
Refs #26000
2015-09-03 11:11:58 +01:00
Jenkins
f5131c2b46 More indent 2015-08-20 13:57:36 -06:00
Jenkins
52cde47aaf Fix failing event tests and modify event init
There was a problem wherein two sockets would race to see which was connected first,
causing unit.utils.event_test.TestSaltEvent.test_event_multiple_clients to fail from
time to time. This gives a little breathing room to the second socket.

This also only does the pub connect if necessary on SaltEvent instantation.
2015-08-20 13:41:07 -06:00
Colton Myers
bf6c7e82cc Keep the formatted assertMsg 2015-08-18 12:50:24 -06:00
Jason Woods
63b195987e Fix forward-merged caching from 2015.5 into 2015.8 to be compatible with the new match_func 2015-08-18 14:37:23 +01:00
Colton Myers
1c661abc91 Skip failing event tests
@driskell it would be great if you could fix these up when you do your
2015.8 refactor
2015-08-12 10:15:11 -06:00
Colton Myers
426b1631c6 Remove stray subscribe 2015-08-11 23:12:18 -06:00
Colton Myers
1502a39779 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    conf/minion
    salt/client/__init__.py
    salt/states/dockerio.py
    salt/utils/event.py
    tests/unit/utils/event_test.py
2015-08-11 18:12:21 -06:00
Jason Woods
65acf975dd Implement full event caching for subscribed tags
Require all multitasking contexts to subscribe to their events so one call to get_event for one tag does not discard events that should be saved for a subsequent call to get_event with another tag.
Use blocking get_event in batching with very small timeout.
Fixes #25998
2015-08-05 11:58:32 +01:00
Dmitry Kuzmenko
5c6276ac7d Subscribe event to bus is optional now
Once subscribed to publisher SUB socket gets collecting all incoming
messages that is unwanted behavior for fire-only events.
Fixed by using listen=<True|False> constructor argument.
2015-08-03 16:10:38 -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
ce850a3e33 pylint cleanup 2015-04-08 08:20:17 -07:00
Thomas Jackson
f5e2650227 Add basic tests for asyncEventpublisher 2015-04-07 21:01:43 -07:00
Pedro Algarvio
c3d922bdc4 Py3 compatibility fixes 2015-01-30 22:25:05 +00:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
Mike Place
bb3c1714f8 Style fixes 2015-01-15 10:48:44 -07:00
Mike Place
6d14d4e661 Fix broken test 2015-01-15 10:41:08 -07:00
Mike Place
845271d31c More linting 2015-01-13 11:15:45 -07:00
Aurynn Shaw
b7ae48642a Adds fire_master to the Salt Event library, for use in 3rd-party code. 2015-01-13 09:29:27 +13:00
sjwehry
342608d9bd Fixed spelling of "below" in 9 different files. 2015-01-06 19:55:28 -05:00
Pedro Algarvio
50bb9c3867 Merge branch '2014.7' into hotfix/merge-forward
Conflicts:
	salt/fileclient.py
2014-11-21 23:39:28 +00:00
Thomas Jackson
44f91a1d21 Add regression test for #8670
Before the fix in #18363 get_event would return None on the first non-matching event (since wait was 0), this is to verify that get_event works properly with a wait of 0
2014-11-21 08:54:05 -08:00
Chris Rebert
c46e43f296 tests/unit/utils/event_test.py: fix typo in comment 2014-11-05 11:03:54 -08:00
Thomas S Hatch
b0561a703b Revert "Pull out pending_events changes and reuse"
This reverts commit e832a3a17f.
2014-08-08 12:49:46 -06:00
Michael Birtwell
32acb7aeae Pull out pending_events changes and reuse
PendingEventsBase implements all the pending_events queue management
Make both normal SaltEvent and raetevent.SaltEvent inherit from this to
standardise the get_event interface.
Update tests for event.SaltEvent (Couldn't find tests for
raetevent.SaltEvent)
2014-07-31 12:23:38 -06:00
Thomas S Hatch
6abccbc0cf fix this better, don't use clean_proc from master.py. 2014-07-15 15:06:15 -06:00
Pedro Algarvio
4d7ca91424 Remove unnecessary ©️ and :license: from file headers 2014-05-26 19:26:15 +01:00
Erik Johnson
5e0d10f03c Update event tests to use truncated hash 2014-05-23 08:57:01 -05:00
Pedro Algarvio
500513375e Use salt's master clean_proc routine.
On Fedora 20, we hit an issue, at least, similar to #3618.
While debugging it, I've found that the runtests process keeps eating
memory.

Using `clean_proc` has at least, allowed the runtests to finish without
triggering #3618.
2014-04-18 07:52:40 +01:00
Pedro Algarvio
7c782f6752 Adapt test case because we default to dropping unrelated events.
The previous default was not dropping unrelated event, however, this
could cause memory leaks, so, the current default is dropping those
events.

We now test for both behaviours.
2014-03-31 03:31:23 +01:00
Pedro Algarvio
ed12816806 Update tests to new event classes signatures. 2014-03-24 16:54:31 +00:00
Thomas S Hatch
fb0ca047d1 Fix lint errors in tests 2013-12-23 09:25:16 -07:00
Mike Place
451cd8d7ea Default var and typo. 2013-12-22 16:40:09 -07:00
Mike Place
0ef7c56e11 Doh. Typo. 2013-12-22 16:37:07 -07:00
Mike Place
dc5874fb1c Don't run event tests on systems that can't support them. 2013-12-22 16:33:07 -07:00
Thomas S Hatch
b63c0449ac Stub out bad test 2013-12-20 13:55:37 -07:00
Thomas S Hatch
41df5b16f3 pylint 2013-12-06 10:50:24 -07:00
Ollie Walsh
68e0e3a106 Add unit test for event timeouts 2013-12-03 22:44:52 +00:00
Pedro Algarvio
877bdb2a90 Lint white-space fixes. 2013-12-03 20:30:16 +00:00
Ollie Walsh
8bacb953c0 Fix typo 2013-12-03 01:45:18 +00:00
Ollie Walsh
d81aeb2c0e More tests 2013-12-03 01:22:51 +00:00
Ollie Walsh
f9aca16aee More unit tests and longer timeouts for travis-ci 2013-12-02 23:20:54 +00:00
Ollie Walsh
6fe85f1294 Add some basic unit tests for events 2013-12-02 22:26:13 +00:00
Pedro Algarvio
e18ba0758b Don't include authorship in generated documentation, the Sphinx way. 2013-09-16 17:24:00 +01:00
Pedro Algarvio
2081aff707 Updated unit.utils.event_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
663f54ef9f Update copyright years of changed files. Added __main__ execution to tests/integration/states/pip.py. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
222be7b446 Make sure every test module is runnable by __main__.
* Double to single quotes
2013-06-28 00:12:56 +01:00