Commit Graph

23 Commits

Author SHA1 Message Date
Doug Rohrer
818645ec83 Make tests pass regardless of order run by always writing default values for configuration settings, rather than trying to only change certain values.
- Always set values to keys that have no defaults in schema, as setting a value to `undefined` does not return the "default" value when application:get_env/3 is called
- Provide an easier way to get the configuration by creating the config record, with appropriate defaults
- Code cleanup on BKV1/2/3 - make them easier to read/understand and for future work in refactoring the tests and removing some of the complexity.
- Now that test is running more consistently, tighten tests to actually test something in test_vnode_protection.
- Bump vnode protection to ?THRESHOLD+1 as 2.0 seems to have one extra message.
- Convert lager:info to lager:debug in successful get cases to reduce noise.
- Remove use of ConsistentType (use macros & pass BKV down to validate).
2015-10-22 16:43:42 -04:00
Doug Rohrer
b863efcd76 Get FSM overload to be predictable by suspending vnodes and inspecting the sidejob configuration to calculate limits.
- Actually test FSM protection - previous limits didn't actually test overload at all. Now stop vnode and do an exact count of how many FSMs should have spun up.

- Make sure to wait for riak_kv before suspending any vnodes.

- Found sidejob race condition and updated test to compensate.
2015-10-22 16:43:32 -04:00
Doug Rohrer
68f40aa5a1 Get vnode protection test working:
Added send of junk message through proxy to force vnode proxies into
overload state - without it, the first messgage would be forwarded to
the vnode and time out, which caused the test to fail.
2015-10-22 16:43:24 -04:00
Fred Dushin
39ce8866be Fixed lingering usage of "fast_path" in overload test 2015-04-01 19:00:53 -04:00
Andrew J. Stone
44d8d6fd65 support fast path in overload test 2015-03-27 16:00:34 -04:00
Andrew J. Stone
44d18d1a87 Remove magic number for overload test 2015-02-11 17:54:12 -05:00
Alex Berghage
a9bef3c0a7 Rolled back change to test_vnode_protection threshold.
This test's a little confused in the sources as-is since it prints
like it's based on the number of requests, even though the actual
comparison is done against a function of THRESHOLD. I've reverted
to the comparison used currently, since it looks to me like this
test should really expect to have ~NUM_REQUESTS processes, and a
vnode queue pretty close to THRESHOLD. I'd appreciate review here
though, particularly if anyone recalls the original intent of
these comparison numbers.
2015-02-10 21:15:23 -05:00
Alex Berghage
ec562e9461 Fixed predicate print formatter (was ~w, now ~p) 2015-02-10 21:11:32 -05:00
Alex Berghage
a7258f4ed7 Loosened criteria for successful overload test.
Previously we'd used a sort of fuzzy 'metric' where we expect the
number of successful requests/fsms to be less than some fudge
factor over the overload threshold. This tends to kick up spurious
failures on the test board without offering much more in the way
of assurances about overload's functionality.

This change instead bases test success on the number of requests
only, not the threshold — if some amount of work was shed at all
we consider that a passing test.

In the future we should revisit this and change the request
accounting machinery to just explicitly track denials instead of
fsm processes / vnode queue depth.
2015-02-10 20:49:16 -05:00
Alex Berghage
e0921b1bf1 Reduced repetition in tests/overload predicates 2015-02-10 20:44:09 -05:00
Kelly McLaughlin
1253c8ad3e More robustification against races between overloading the vnodes and the list_keys attempt for the coverage testing.
Conflicts:
	tests/overload.erl
2014-08-22 15:58:47 -06:00
Jon Anderson
09a60d1289 add timeouts to calls instead of from .riak_test.config 2014-07-24 14:47:46 -04:00
Jon Anderson
a597b3ee63 removed sleep 2014-07-22 17:03:16 -04:00
Jon Anderson
0671b59b4c add a intercept/server accounting of get_fsm processes. 2014-07-22 16:48:25 -04:00
Kelly McLaughlin
98681cd658 Increase the test code coverage and make the coverage checking more
robust to failures.
2014-07-15 16:48:43 -06:00
Kelly McLaughlin
b59fb48611 Expand the overload test to include strong consistency
Change the overload test to exercise the strongly consistent code
paths in addition to the eventually consistent paths during overload
conditions.
2014-07-11 13:23:48 -06:00
Andrew J. Stone
e4b9cb7634 Use a real message to overload vnodes during coverage tests in overload.erl 2014-02-19 14:15:51 -05:00
Andrew J. Stone
bfe561eb00 use pb client for list_keys to ensure interface success 2014-02-13 15:51:49 -05:00
Andrew J. Stone
5e0ff64a66 get coverage query overload tests to repeatedly pass 2014-01-28 18:49:57 -05:00
Andrew J. Stone
242493baaf modify how coverage queries are checked in overload test 2014-01-27 15:25:02 -05:00
Andrew J. Stone
598863b3f7 list_keys overload check working 2014-01-27 15:25:02 -05:00
Andrew J. Stone
b4a07894b7 WIP test listing keys respods with {error, overload} 2014-01-27 15:25:01 -05:00
Joseph Blomstedt
114fb9f7e2 Add test for vnode + FSM overload protection 2014-01-14 01:02:48 -05:00