assert randomization

add randomization to disable assert, 10% chance that test will run with
tests.assertion.disabled=org.elasticsearch
This commit is contained in:
mrsolo 2014-01-15 16:27:46 -08:00
parent b358f13954
commit 661e9b91cf
1 changed files with 9 additions and 4 deletions

View File

@ -65,16 +65,21 @@ def get_env_matrix(data_array)
tests_nightly = get_random_one([true, false])
tests_nightly = get_random_one([false]) #bug
test_assert_off = (rand(10) == 9) #10 percent chance turning it off
[*data_array].map do |x|
{
data_hash = {
'PATH' => File.join(x,'bin') + ':' + ENV['PATH'],
'JAVA_HOME' => x,
'BUILD_DESC' => "%s,%s,%s%s,%s %s"%[File.basename(x), es_node_mode, tests_nightly ? 'nightly,':'',
es_test_jvm_option1[1..-1], es_test_jvm_option2[4..-1], es_test_jvm_option3[4..-1]],
'BUILD_DESC' => "%s,%s,%s%s,%s %s%s"%[File.basename(x), es_node_mode, tests_nightly ? 'nightly,':'',
es_test_jvm_option1[1..-1], es_test_jvm_option2[4..-1], es_test_jvm_option3[4..-1],
test_assert_off ? ',assert off' : ''],
'es.node.mode' => es_node_mode,
'tests.nightly' => tests_nightly,
'tests.jvm.argline' => "%s %s %s"%[es_test_jvm_option1, es_test_jvm_option2, es_test_jvm_option3]
'tests.jvm.argline' => "%s %s %s"%[es_test_jvm_option1, es_test_jvm_option2, es_test_jvm_option3],
}
data_hash['tests.assertion.disabled'] = 'org.elasticsearch' if test_assert_off
data_hash
end
end