瀏覽代碼

Tests: Speed up backward-compatibility tests for 1.1.0

1.1.0 is affected by #5817 which prevents merges from keeping up with the
indexing rate. As a consequence it generates lots of segments and makes bw
compat tests slow. So I added a special case for this version to index fewer
documents.
Adrien Grand 10 年之前
父節點
當前提交
1401075070

+ 5 - 0
dev-tools/create-bwc-index.py

@@ -239,6 +239,11 @@ def generate_index(client, version):
   assert health['timed_out'] == False, 'cluster health timed out %s' % health
 
   num_docs = random.randint(2000, 3000)
+  if version == "1.1.0":
+    # 1.1.0 is buggy and creates lots and lots of segments, so we create a
+    # lighter index for it to keep bw tests reasonable
+    # see https://github.com/elastic/elasticsearch/issues/5817
+    num_docs = num_docs / 10
   index_documents(client, 'test', 'doc', num_docs)
   logging.info('Running basic asserts on the data added')
   run_basic_asserts(client, 'test', 'doc', num_docs)

二進制
src/test/resources/org/elasticsearch/bwcompat/index-1.1.0.zip


二進制
src/test/resources/org/elasticsearch/bwcompat/repo-1.1.0.zip