From ac646642e78b29a026341d0b7ccf03f170319f44 Mon Sep 17 00:00:00 2001 From: Tal Levy Date: Thu, 7 Mar 2019 10:06:13 -0800 Subject: [PATCH] fix index refresh in test within 20_mix_typeless_typeful (#39198) the test "Implicitly create a typeless ... typed template" fails occasionally because the index operation hasn't propogated to update the index mapping in time for the following assertion about a dynamically mapped field "bar". error failed with: ``` field [test-1.mappings.my_type.properties.bar] doesn't have a true value Expected: not null but: was null ``` refreshing the index should resolve this timing issue. --- .../test/indices.create/20_mix_typeless_typeful.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml index 5114b7f7521ab..a05134866628b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml @@ -104,8 +104,8 @@ "Implicitly create a typeless index while there is a typed template": - skip: - version: "all" - reason: "awaits fix in #39198" + version: " - 6.99.99" + reason: needs typeless index operations to work on typed indices - do: indices.put_template: @@ -124,6 +124,11 @@ index: test-1 body: { bar: 42 } +# ensures dynamic mapping update is visible to get_mapping + - do: + cluster.health: + wait_for_events: normal + - do: indices.get_mapping: include_type_name: true