@@ -69,7 +69,7 @@ public void cleanup() throws Exception {
6969
7070 public void testCreateIndexPreference () throws Exception {
7171 client ().admin ().indices ().prepareCreate (INDEX ).get ();
72- assertUsedV1 ();
72+ assertUsedV2 ();
7373
7474 client ().admin ().indices ().create (new CreateIndexRequest (INDEX ).preferV2Templates (false )).get ();
7575 assertUsedV1 ();
@@ -80,7 +80,7 @@ public void testCreateIndexPreference() throws Exception {
8080
8181 public void testIndexingRequestPreference () throws Exception {
8282 client ().index (new IndexRequest (INDEX ).source ("foo" , "bar" )).get ();
83- assertUsedV1 ();
83+ assertUsedV2 ();
8484
8585 client ().index (new IndexRequest (INDEX ).source ("foo" , "bar" ).preferV2Templates (false )).get ();
8686 assertUsedV1 ();
@@ -89,7 +89,7 @@ public void testIndexingRequestPreference() throws Exception {
8989 assertUsedV2 ();
9090
9191 client ().update (new UpdateRequest (INDEX , "1" ).doc ("foo" , "bar" ).docAsUpsert (true )).get ();
92- assertUsedV1 ();
92+ assertUsedV2 ();
9393
9494 client ().update (new UpdateRequest (INDEX , "1" ).doc ("foo" , "bar" ).docAsUpsert (true ).preferV2Templates (false )).get ();
9595 assertUsedV1 ();
@@ -98,7 +98,7 @@ public void testIndexingRequestPreference() throws Exception {
9898 assertUsedV2 ();
9999
100100 client ().bulk (new BulkRequest (INDEX ).add (new IndexRequest (INDEX ).source ("foo" , "bar" ))).get ();
101- assertUsedV1 ();
101+ assertUsedV2 ();
102102
103103 client ().bulk (new BulkRequest (INDEX ).add (new IndexRequest (INDEX ).source ("foo" , "bar" )).preferV2Templates (false )).get ();
104104 assertUsedV1 ();
@@ -115,8 +115,8 @@ public void testRolloverMaintainsSetting() throws Exception {
115115
116116 client ().admin ().indices ().prepareRolloverIndex ("alias" ).get ();
117117 GetSettingsResponse resp = client ().admin ().indices ().prepareGetSettings ().setIndices (INDEX + "-000002" ).get ();
118- assertThat ("expected index to use V1 template and have priority of 15 " ,
119- resp .getSetting (INDEX + "-000002" , "index.priority" ), equalTo ("15 " ));
118+ assertThat ("expected index to use V2 template and have priority of 23 " ,
119+ resp .getSetting (INDEX + "-000002" , "index.priority" ), equalTo ("23 " ));
120120 client ().admin ().indices ().prepareDelete (INDEX + "*" ).get ();
121121 }
122122
0 commit comments