Renato Alves
d76d5c3587
Tests: Make sleeptime in wait_conditional an argument
2015-03-27 10:53:18 +00:00
Renato Alves
526665d4ec
Tests: Configurable check for taskd readyness
...
* Also increase the frequency from 1/s to 2/s
2015-03-27 10:51:38 +00:00
Renato Alves
357850177d
Tests: common/reusable variables live in basetest.utils
2015-03-27 10:14:44 +00:00
Renato Alves
180c382de2
Tests - Finer control on which binaries to look for on PATH
...
* It is now possible to control whether taskw and/or taskd are looked up
on the PATH by setting TASK_USE_PATH/TASKD_USE_PATH to "1"
2015-03-03 01:46:53 +00:00
Renato Alves
d211969236
Tests - clarify that USE_PATH alone is not enough.
2015-02-17 13:37:39 +00:00
Renato Alves
bd320b6729
Tests - Remove commented code
2015-02-17 12:24:13 +00:00
Renato Alves
3f004f547e
Tests - Don't hang if spawning taskw fails
2015-02-17 12:24:13 +00:00
Renato Alves
9180aa6e33
Tests - minor formatting changes
2015-02-16 15:37:31 +00:00
Renato Alves
32d837fb25
Tests - Convert add.t to python
...
* Also added UUID_regex to basetest.utils, likely to be reused
2015-02-16 15:36:38 +00:00
Renato Alves
4b839f2c83
Tests - Significant speed improvement at cost of CPU cycles
2015-02-16 01:59:47 +00:00
Renato Alves
1e1bd32c42
Tests - Rework how taskw is launched from python
...
* Should avoid some odd race conditions
2015-02-16 01:59:32 +00:00
Renato Alves
d1698eab2d
Fix usage of taskd.trust=strict on the test suite
...
* This reverts commit 67cb30fdce
.
* Code also now tests if taskd is listening on IPv4 or IPv6 interfaces.
2015-01-20 11:56:53 +00:00
Renato Alves
d261a38d17
Unittest - Enhanced support for testing hooks (wip)
...
* It is now possible to test:
* Hook Input/Output on STDIN/STDOUT channels
* Exit code of hook script
* Execution count (how many times the hook was executed)
* Timestamp execution (when was the hook executed - milisec resolution)
2014-11-02 00:01:06 +00:00
Renato Alves
efdb31fb90
Unittest - default to not merging stdout/stderr during tests
...
* Tests will now check that stderr is used for errors
* Tests were adjusted to reflect the API change
2014-10-20 14:01:21 +01:00
Renato Alves
b4f33ec0c6
Unittest - Replace None by objects representing the state of stdout/err
2014-10-20 13:29:30 +01:00
Renato Alves
bb060d5ff8
Unittest - Allow specifying custom timeout for slow commands.
...
* Useful when testing with big tasks (1000+ annotations) or sync
operations that take longer than 1 second (default)
2014-10-16 20:52:17 +01:00
Renato Alves
cf5c7abd01
Unittest - Workaround race condition when killing slow processes
...
* In some cases the process finishes normally very close to the timeout
2014-10-16 16:47:10 +01:00
Renato Alves
53fd37cae2
Unittest - Also propagate the correct exit code
2014-10-10 16:42:41 +01:00
Renato Alves
40a95e1196
Unittest - Fix case where exit code was incorrectly registered
2014-10-10 16:19:39 +01:00
Renato Alves
d9d3b47c31
Unittest - default to ../src/ as location for task/taskd binaries
2014-07-31 17:03:49 +01:00
Renato Alves
974045da7a
Unittest - Helper code to easily parse tx.data
2014-07-19 02:28:52 +01:00
Renato Alves
a88b3be093
Unittest - Memoize utils.which for faketime speedups
2014-07-18 17:23:19 +01:00
Renato Alves
d69533add1
Unittest - Add a memoize function for caching of function results
2014-07-18 17:22:17 +01:00
Renato Alves
00ee5b2289
Unittest - Skip tests that use faketime if not available
2014-07-18 17:20:27 +01:00
Renato Alves
2a198d59fe
Unittest - Add mechanism to skip task and taskd tests
...
* When testing multiple clients vs server versions, repeating client
tests is unnecessary. By setting the env variables TASKW_SKIP and
TASKD_SKIP it will now be possible to skip all task (client only) and
taskd (client + server) tests, respectively.
2014-07-18 13:33:51 +01:00
Renato Alves
1f279ffde8
Unittest - Try to avoid racing conditions failures when capturing stdout/stderr
...
* The new unblocking strategy for subprocesses involves timeouts and
waiting periods. If the timeout is too short (or absent) tests may show
intermittent failure.
* Increasing the timeout may make tests a bit slower but more reliable.
2014-07-15 03:29:49 +01:00
Renato Alves
e3d0d2ff34
Unittest - Stream blocking tests can now be safely performed
...
* Processes that blocked waiting for stdin data will now be aborted
after a 1 second timeout.
* As a side-effect any process that takes longer than 1 second to
finish will also be aborted.
2014-07-15 02:43:57 +01:00
Renato Alves
b77dfc6312
Unittest - Add which() backported from py3.3
2014-07-15 00:49:50 +01:00
Renato Alves
715a414abd
UnitTests
...
* Taskd and Taskw classes for testing are now available
* Testing of server and client can now be performed.
* The newer test wrappers will eventually replace the BaseTest class
2014-07-06 02:03:04 +01:00
Renato Alves
29d5de1154
Testing
...
Add a class to manage one or more taskd servers running on the same
machine.
2014-05-17 21:44:51 +01:00