ElasticTestUtils: also reuse index name constants
Rather than the no longer reused _PREFIX ones, now that the index name constants are all properly refactored, which enabled such reuse. Change-Id: Ifc1244f5633fc31f6c71bca1277dbe2fab5a8a82
This commit is contained in:
		| @@ -15,11 +15,11 @@ | ||||
| package com.google.gerrit.elasticsearch; | ||||
|  | ||||
| import static com.google.common.truth.Truth.assertThat; | ||||
| import static com.google.gerrit.elasticsearch.ElasticAccountIndex.ACCOUNTS_PREFIX; | ||||
| import static com.google.gerrit.elasticsearch.ElasticChangeIndex.CHANGES_PREFIX; | ||||
| import static com.google.gerrit.elasticsearch.ElasticAccountIndex.ACCOUNTS; | ||||
| import static com.google.gerrit.elasticsearch.ElasticChangeIndex.CHANGES; | ||||
| import static com.google.gerrit.elasticsearch.ElasticChangeIndex.CLOSED_CHANGES; | ||||
| import static com.google.gerrit.elasticsearch.ElasticChangeIndex.OPEN_CHANGES; | ||||
| import static com.google.gerrit.elasticsearch.ElasticGroupIndex.GROUPS_PREFIX; | ||||
| import static com.google.gerrit.elasticsearch.ElasticGroupIndex.GROUPS; | ||||
|  | ||||
| import com.google.common.base.Strings; | ||||
| import com.google.common.io.Files; | ||||
| @@ -128,7 +128,7 @@ final class ElasticTestUtils { | ||||
|         .client() | ||||
|         .admin() | ||||
|         .indices() | ||||
|         .prepareCreate(String.format("%s%04d", CHANGES_PREFIX, changeSchema.getVersion())) | ||||
|         .prepareCreate(String.format("%s_%04d", CHANGES, changeSchema.getVersion())) | ||||
|         .addMapping(OPEN_CHANGES, gson.toJson(openChangesMapping)) | ||||
|         .addMapping(CLOSED_CHANGES, gson.toJson(closedChangesMapping)) | ||||
|         .execute() | ||||
| @@ -141,7 +141,7 @@ final class ElasticTestUtils { | ||||
|         .client() | ||||
|         .admin() | ||||
|         .indices() | ||||
|         .prepareCreate(String.format("%s%04d", ACCOUNTS_PREFIX, accountSchema.getVersion())) | ||||
|         .prepareCreate(String.format("%s_%04d", ACCOUNTS, accountSchema.getVersion())) | ||||
|         .addMapping(ElasticAccountIndex.ACCOUNTS, gson.toJson(accountMapping)) | ||||
|         .execute() | ||||
|         .actionGet(); | ||||
| @@ -153,7 +153,7 @@ final class ElasticTestUtils { | ||||
|         .client() | ||||
|         .admin() | ||||
|         .indices() | ||||
|         .prepareCreate(String.format("%s%04d", GROUPS_PREFIX, groupSchema.getVersion())) | ||||
|         .prepareCreate(String.format("%s_%04d", GROUPS, groupSchema.getVersion())) | ||||
|         .addMapping(ElasticGroupIndex.GROUPS, gson.toJson(groupMapping)) | ||||
|         .execute() | ||||
|         .actionGet(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marco Miller
					Marco Miller