From 661e9b91cfa8204a7fa4c4db2de2ce7eacd5822b Mon Sep 17 00:00:00 2001 From: mrsolo Date: Wed, 15 Jan 2014 16:27:46 -0800 Subject: [PATCH] assert randomization add randomization to disable assert, 10% chance that test will run with tests.assertion.disabled=org.elasticsearch --- dev-tools/build_randomization.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dev-tools/build_randomization.rb b/dev-tools/build_randomization.rb index 321c8216e73..b52f204200d 100644 --- a/dev-tools/build_randomization.rb +++ b/dev-tools/build_randomization.rb @@ -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