forked from basho/riak_test
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nhse d34 wdaymerge #22
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Support building a portable riak_test escript that can be packaged (along with group specs) and used outside the repo. wday-contrib 854 1548 Co-authored-by: Fred Dushin <[email protected]>
Also allow `riak_test_escript:add_deps/1` to gracefully skip nonexistant directories, printing a warning rather than killing the process. This allows us to ignore/address paths specific to the upstream test environment without (likely) merge conflicts. wday-contrib 181 184 854 861 1548 Co-authored-by: Ted Burghart <[email protected]>
* Removed parameterised modules deprecated in OTP 21 and update riak object handling to the new riakc_obj format. * Attempt to fix timing issue in verify_membackend. * Correct broken rt:priv_dir/0 function that didn't work in an escript. * Fixed expected string from OTP22, as well as format error in error case. wday-contrib 884 905 910 1548 Co-authored-by: Andy Till <[email protected]> Co-authored-by: Fred Dushin <[email protected]> Co-authored-by: Ted Burghart <[email protected]>
* Handle missing tests gracefully and include them in junit output file. * Rework generation of junit_*.xml file to always be valid. * Added the DEBUG_JUNIT_INPUT macro (default undefined) to dump the test result proplist for debugging and/or further improving the junit failure content. * Use `conn_fail_time` for connection timeout when failure is expected. * Fix bad string comparison in `verify_tictac_aae`. * Remove check for `search` diags in `riaknostic_rt`. * Cleanup in `verify_removed_capability`, still problematic. * Augment `verify_handoff` test to test for ownership, hinted, and repair handoff events, including new stats. * Include new pb and tombstone put stats and disabled `leveldb_read_block_error` stat in `verify_riak_stats` test. * Fix parameterized module pattern and version assumprions in `verify_vnode_polling_caps` test. * Fix version assumptions and redbug usage in `verify_head_capability` test. wday-contrib 53 852 892 915 921 924 928 929 937 941 1548 Co-authored-by: Ted Burghart <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
wday-contrib 956 957 1548 Co-authored-by: Andy Till <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
* `verify_riak_stats` - Observer removed from Riak. * `replication2_upgrade` - Run in chunks, instead of one at a time. * `pb_cipher_suites` - Dead code inside deprecation macro conditionals removed. Several deletions, all of which have fallen into disrepair and are no longer relevant in 3.x+. Most deleted files have been removed in community version 3.2, so they're removed here to get them out of our way: * Old pre-3.x cruft * `perf` harness and related modules * Giddyup stuff * Smoke test `rebar.config` tightens up several option groups, with the eventual goal of clean `xref` passes, so the less old gunk is in the way, the better. The `observer` module has been renamed to `rt_observer` to remove potential conflicts with the OTP module of the same name - it's not clear whether this module has ongoing value. wday-contrib 1014 1050 1059 1548 Co-authored-by: Adrian Fraiha <[email protected]> Co-authored-by: Ted Burghart <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
* Add `logging.hrl` to support logging transition. * Add `rtt` and `rt_harness` modules to start getting interfaces properly specified. * Add `rt_vsn` version support module. * Update `verify_head_capability` test to use new functionality. * Add check on uncovered preflists stat to `verify_availability` and `verify_riak_stats` tests. wday-contrib 1051 1052 1054 1067 1548 Co-authored-by: Ted Burghart <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
wday-contrib 770 775 838 1548 Co-authored-by: Adrian Fraiha <[email protected]> Co-authored-by: Andy Till <[email protected]> Co-authored-by: Ted Burghart <[email protected]>
Add the `rt_exec` module for visibility into external program execution. * Public types used by the `rt_exec` module are added to the `rtt` module, and documented. Transition `rt` and `rtdev` modules to new `riak_test` modules. This brings with it a number of related changes: * A few functions' behaviors have changed, commented with "Change from historical behavior", because: * The implemented behavior was complex, when only the simplest behavior was actually used. * The implemented behavior was functionally or logically broken and/or unimplementable through a non-local `rt_harness` behavior. * The API or behavior was designed around obsolete (prior to 3.x) Riak interfaces. * Anything that calls revised `rt` API functions is updated. * Anything other than `rt` that uses the value of `rt_config:get(rt_harness)` _or_ an explicit harness module is made not to do so. * As more API calls deliberately throw exceptions, everything runs inside an outer try/catch in `riak_test_escript.escript` for debugging. Calls to nonexistant functions (`erlang:exit/0`, `gen_server:cast/3`, etc) are fixed. Additonally, some previously missed cleanup is included: * Deprecate `stacktrace.hrl` - not removed yet, we want merge conflicts if they occur. * Change exception patterns due to above, including 2 tests that used it. * Deprecate the `rebar_riak_test_plugin` module _and_ tell `xref` to ignore its outside calls. * Deprecate the unused `rt_local` module. * Remove remaining `giddyup` references. * Minor cleanup obvious from diffs. * Logging include file is updated to not wrap output lines when logging a value without a format specifier. Begin opportunistic cleanup of `eunit.hrl` inclusion in `tests/` modules. Changed files do not contain `eunit` tests, so use `assert.hrl` to avoid `export_all` and associated warning. Rework `rt_redbug` module for consistent, deterministic `redbug` behavior. Addresses functional issues with using `redbug` within `riak_test` tests: * Previously the `rt_redbug` module used RPC to control Redbug on test nodes, bringing with it a host of issues that were deemed too problematic to address. * Redbug's `stop` operation is asynchronous, and neither `rt_redbug` nor applicable tests handled this behavior appropriately. These issues are addressed by: * `rt_redbug:trace/3` now runs Redbug locally as a proxy for Redbug on the remote host, in accordance with Redbug's design. * `rt_redbug:stop/0` is now a synchronous wrapper around the asynchronous `redbug:stop/1` function, using what appears to be stable public Redbug API behavior (docs are less than complete). These changes are incorporated into the `http_bucket_types` and `verify_head_capability` tests, which had previously relied on less reliable approaches to using `redbug`. All _changes_ are clean through `xref`, `dialyzer`, `eunit`, and `edoc`, however pre-exitsing unchanged code still generates warnings/errors in `dialyzer` and `edoc`. wday-contrib 849 1053 1055 1390 1548
Test PR PW when set by bucket properties (basho#1366) Extend test to use riak_client (basho#1367) Fix Riak version check in test Add tolerance for the occasional tombstone left hanging Issues of stability post partition Mas i1847 putapi (basho#1370) Enhance handoff repair tests (basho#1369) Mas delete and transfer (basho#1371) Test reliability improvements (basho#1372) Add AAE Update verify_rejoin.erl (basho#1373) Test range repl with node_confirms set to 2 (basho#1374) wday-contrib 1100 1548 Co-authored-by: Martin Sumner <[email protected]> Co-authored-by: Ted Burghart <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
…s2 stat IMPORTANT: * This commit fixes a longstanding bug in the verify_handoff_<encoding> tests, which have overriden the capability in the wrong application since the tests' origin and hence had no effect on the actual encoding. * A side-effect of this fix is that the verify_handoff_zlib test now fails, due to changes in riak_kv_vnode:encode_binary_object/3 at riak_kv commit 5b8f4c06411ce04009a60498419833d16a050179 that crash the vnode if encoding is set to anything other than 'encode_raw'. Fixes rt_kv_worker_proc to not return false failures by adding message filtering. Note that there is substantial overlap between the verify_handoff and verify_handoff_stats tests, but it's not immediately clear how or whether they should be refactored to share duplicated code. wday-contrib 1166 1183 1208 1548
This is an interim commit that compiles but will not function properly! Subsequent commit(s) will complete the lager => logger transition. wday-contrib 1300 1969
Standalone commit so git can follow the renaming. wday-contrib 1300 1969
Reworks riak_test plumbing to use 'logger' instead of 'lager'. * This part (the src/ modules) is where the heavy lifting is, and should be the focus of reviewers. * Users are encouraged to run `rebar3 edoc` and refer to the API documentation it produces. * It's still far from perfect, but also far more useful than it's ever been before. While almost every test source file is touched, most of the changes are highly pattern based and very low risk. Where test source code is changed beyond the `lager:xxx` to `?LOG_XXX` conversion (because I had to fix some tests to run them for validation) the changes have been thoroughly exercised. There ARE still flappy and non-functional tests that need attention, but I tried hard not to make anything worse. * `location` fails to complete transfers and times out. * `location_leave` hangs forever - ensure `test_timeout` is set. * `nextgenrepl_aaefold` consistently fails the last assertion in `confirm/0`. * `verify_membackend` looks like it may be out of sync with the backend implementation and/or OTP version? Because of the different log configuration and behavior, most '~p' format specifiers have been changed to either '~0p' or another non-breaking specifier when their types were obvious. For the most part, '~p' is retained only for output that's desirable in multi-line form, such as stack traces and properties files. Because of the scale of the changes, lots of tests were run repeatedly, giving time for opportunistic cleanup while they ran: * Many dialyzer warnings have been resolved. * The conversion of tests from including 'eunit.hrl' to using 'assert.hrl' instead is completed. * Quickcheck tests still include 'eunit.hrl', as I can't test them. * The 'export_all' option has been removed from all non-Quickcheck tests and maintained src/ modules. Overall, edoc and xref are happy and dialyzer is less unhappy. wday-contrib 1300 1308 1334 1969 Co-authored-by: Ted Burghart <[email protected]> Co-authored-by: Fred Dushin <[email protected]>
New tests have been added since the wday merge, so these have now been de-lagered. There are a number of issues arising as these tests are run, documented in #21. This commit provides initial workarounds to problems highlighted in this issue with: - location - verify_riak_stats - verify_2i_limit
Some riak_core settings were erroneously being added as default bucket properties. The algorithm_supported function needs to test the actual node deployed. As the verify_mr_prereduce_node_down test is not testing PUT whilst a stop is ongoing, so stop_and_wait to make this reliable during preflist changes.
Standardise on fast handoff settings, and allow for repl_util to work without requiring knowledge of riak code within the test
Depends on updates to the riak erlang clients, most issues with dialyzer were related to types not being correctly or completely defined within these clients. Most of the remaining changes are related to removing dead/unused code paths, or converting assertions that can never fail (according to types) to explicit pattern matches. In some cases there is hidden magic within clients that allow incorrect types to work, and be tested. For example with using string or binary as content type for PUT, the test has been changed to reflect the advertised type. Some deprecated stuff has been removed, rather than having the effort of fixing it: - mapred_search_switch (yokozuna no longer supported), test was not in any group; - rpc_output (a test of lager?) not in any group; - replication2_pg long since marked as deprecated, and doesn't currently work (although the test may not have been replaced with a working case). the proxy-get feature it tests is part of CS and not KV. To run dialyzer in OTP 26 uncomment the no_unknown warning in rebar.config for `check` profile. As riak_test does not explicitly load riak, then any internal riak functions referred to in a test will be unknown. There are two cases of explicitly allowing dialyzer errors: - in job_nenable_common where the fix to a dialyzer error is not permitted according to a comment - in verify_api_timeout where there is a need to test an illegitimate client request
Use `nhse-develop-3.4` branches not temporary branches, and make the profile change for dialyzer checking dynamic. Standardising on using rhc not riakhttpc as the application name seems to resolve the dialyzer issues with job_enable_common. Now passes dialyzer for both OTP 24 and OTP 26.
As per review suggestion. The suggested change has been edited to remove the https option, as this is not currently tested (so would otherwise cause a further dialyzer warning)
For verify_dollarkeyreap, it is arguable that the type on the query is wrong. It is possible to search for keys with sibling_count > 0 (i.e. find all keys), although this isn't the purpose for find_keys - hence the type requiring pos_integer() not non_neg_integer(). Using object_stats is a cleaner way of getting the required result, so this modification has been made to clear the dialyzer error.
Test of backwards compatibility with map-based tictac tree
stephenwood24-nhs
approved these changes
Sep 19, 2024
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.
Approved.
Confirmed dialyzer passes and vape tests pass (except for known failure with basic_command_line test)
ExitCode is still returned, but halt/1 is now not called if the batch option has been set.
Pass dialyzer for riak_test
May help with intermittent issues with getting aae trees to rebuild at startup - given that startup will now be one cluster change and not multiple (which may lead to a vnode starting, unregistering and re-starting). No reason anyway for repl tests to use there own join mechanism.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial phase of the merge of wday-develop-3.2 and nhse-develop-3.4
There are a number of test stability issues generated by the merge. These issues are being tracked here #21.
Work ongoing ....