26
26
init_per_testcase(Func, Conf) ->
27
27
mnesia_test_lib:init_per_testcase(Func, Conf).
29
fin_per_testcase(Func, Conf) ->
30
mnesia_test_lib:fin_per_testcase(Func, Conf).
29
end_per_testcase(Func, Conf) ->
30
mnesia_test_lib:end_per_testcase(Func, Conf).
32
32
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34
["Verify that Mnesia really is a distributed real-time DBMS",
35
"This is the test suite of the Mnesia DBMS. The test suite",
36
"covers many aspects of usage and is indended to be developed",
37
"incrementally. The test suite is divided into a hierarchy of test",
38
"suites where the leafs actually implements the test cases.",
39
"The intention of each test case and sub test suite can be",
40
"read in comments where they are implemented or in worst cases",
41
"from their long mnemonic names. ",
43
"The most simple test case of them all is called 'silly'",
44
"and is useful to run now and then, e.g. when some new fatal",
45
"bug has been introduced. It may be run even if Mnesia is in",
46
"such a bad shape that the test machinery cannot be used.",
47
"NB! Invoke the function directly with mnesia_SUITE:silly()",
48
"and do not involve the normal test machinery."];
33
suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
36
%% Verify that Mnesia really is a distributed real-time DBMS.
37
%% This is the test suite of the Mnesia DBMS. The test suite
38
%% covers many aspects of usage and is indended to be developed
39
%% incrementally. The test suite is divided into a hierarchy of test
40
%% suites where the leafs actually implements the test cases.
41
%% The intention of each test case and sub test suite can be
42
%% read in comments where they are implemented or in worst cases
43
%% from their long mnemonic names.
45
%% The most simple test case of them all is called 'silly'
46
%% and is useful to run now and then, e.g. when some new fatal
47
%% bug has been introduced. It may be run even if Mnesia is in
48
%% such a bad shape that the test machinery cannot be used.
49
%% NB! Invoke the function directly with mnesia_SUITE:silly()
50
%% and do not involve the normal test machinery.
53
[{group, light}, {group, medium}, {group, heavy},
57
%% The 'light' test suite runs a selected set of test suites and is
58
%% intended to be the smallest test suite that is meaningful
59
%% to run. It starts with an installation test (which in essence is the
60
%% 'silly' test case) and then it covers all functions in the API in
61
%% various depths. All configuration parameters and examples are also
64
[{group, install}, {group, nice}, {group, evil},
65
{group, mnesia_frag_test, light}, {group, qlc},
66
{group, registry}, {group, config}, {group, examples}]},
67
{install, [], [{mnesia_install_test, all}]},
68
{nice, [], [{mnesia_nice_coverage_test, all}]},
69
{evil, [], [{mnesia_evil_coverage_test, all}]},
70
{qlc, [], [{mnesia_qlc_test, all}]},
71
{registry, [], [{mnesia_registry_test, all}]},
72
{config, [], [{mnesia_config_test, all}]},
73
{examples, [], [{mnesia_examples_test, all}]},
74
%% The 'medium' test suite verfies the ACID (atomicity, consistency
75
%% isolation and durability) properties and various recovery scenarios
76
%% These tests may take quite while to run.
78
[{group, install}, {group, atomicity},
79
{group, isolation}, {group, durability},
80
{group, recovery}, {group, consistency},
82
{group, mnesia_frag_test, medium}]},
83
{atomicity, [], [{mnesia_atomicity_test, all}]},
84
{isolation, [], [{mnesia_isolation_test, all}]},
85
{durability, [], [{mnesia_durability_test, all}]},
86
{recovery, [], [{mnesia_recovery_test, all}]},
87
{consistency, [], [{mnesia_consistency_test, all}]},
88
{majority, [], [{mnesia_majority_test, all}]},
89
%% The 'heavy' test suite runs some resource consuming tests and
91
{heavy, [], [{group, measure}]},
92
{measure, [], [{mnesia_measure_test, all}]},
94
[{group, mnesia_measure_test, prediction}]},
96
[{group, mnesia_measure_test, fairness}]},
98
[{group, mnesia_measure_test, benchmarks}]},
100
[{group, mnesia_measure_test, consumption}]},
102
[{group, mnesia_measure_test, scalability}]},
103
%% This test suite is an extract of the grand Mnesia suite
104
%% it contains OTP R4B specific test cases
106
[{mnesia_config_test, access_module},
107
{mnesia_config_test, dump_log_load_regulation},
108
{mnesia_config_test, embedded_mnemosyne},
109
{mnesia_config_test, ignore_fallback_at_startup},
110
{mnesia_config_test, max_wait_for_decision},
111
{mnesia_consistency_test, consistency_after_restore},
112
{mnesia_evil_backup, restore},
113
{mnesia_evil_coverage_test, offline_set_master_nodes},
114
{mnesia_evil_coverage_test, record_name},
115
{mnesia_evil_coverage_test, user_properties},
116
{mnesia_registry_test, all}, {group, otp_2363}]},
117
%% Index on disc only tables
119
[{mnesia_dirty_access_test,
120
dirty_index_match_object_disc_only},
121
{mnesia_dirty_access_test, dirty_index_read_disc_only},
122
{mnesia_dirty_access_test,
123
dirty_index_update_bag_disc_only},
124
{mnesia_dirty_access_test,
125
dirty_index_update_set_disc_only},
126
{mnesia_evil_coverage_test,
127
create_live_table_index_disc_only}]}].
129
init_per_group(_GroupName, Config) ->
132
end_per_group(_GroupName, Config) ->
135
init_per_suite(Config) ->
138
end_per_suite(Config) ->
57
142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59
144
mnesia_install_test:silly().
61
146
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63
["The 'light' test suite runs a selected set of test suites and is",
64
"intended to be the smallest test suite that is meaningful",
65
"to run. It starts with an installation test (which in essence is the",
66
"'silly' test case) and then it covers all functions in the API in",
67
"various depths. All configuration parameters and examples are also",
74
{mnesia_frag_test, light},
82
[{mnesia_install_test, all}].
85
[{mnesia_nice_coverage_test, all}].
88
[{mnesia_evil_coverage_test, all}].
91
[{mnesia_qlc_test, all}].
94
[{mnesia_registry_test, all}].
97
[{mnesia_config_test, all}].
100
[{mnesia_examples_test, all}].
102
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104
["The 'medium' test suite verfies the ACID (atomicity, consistency",
105
"isolation and durability) properties and various recovery scenarios",
106
"These tests may take quite while to run."];
115
{mnesia_frag_test, medium}
119
[{mnesia_atomicity_test, all}].
122
[{mnesia_isolation_test, all}].
125
[{mnesia_durability_test, all}].
128
[{mnesia_recovery_test, all}].
130
consistency(suite) ->
131
[{mnesia_consistency_test, all}].
133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135
["The 'heavy' test suite runs some resource consuming tests and",
141
[{mnesia_measure_test, all}].
144
[{mnesia_measure_test, prediction}].
147
[{mnesia_measure_test, fairness}].
150
[{mnesia_measure_test, benchmarks}].
152
consumption(suite) ->
153
[{mnesia_measure_test, consumption}].
155
scalability(suite) ->
156
[{mnesia_measure_test, scalability}].
159
148
clean_up_suite(doc) -> ["Not a test case only kills mnesia and nodes, that where"
160
149
"started during the tests"];