Skip to content

Commit

Permalink
Add tests for RemoteGlobalMetadataManager
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
shiv0408 committed Jun 17, 2024
1 parent 0d38d14 commit c0a12f2
Show file tree
Hide file tree
Showing 7 changed files with 556 additions and 10 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void testSerDe() throws IOException {
}
}

private CoordinationMetadata getCoordinationMetadata() {
public static CoordinationMetadata getCoordinationMetadata() {
return CoordinationMetadata.builder()
.term(TERM)
.lastAcceptedConfiguration(new VotingConfiguration(Set.of("node1")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void testSerDe() throws IOException {
}
}

private Custom getCustomMetadata() {
public static Custom getCustomMetadata() {
return IndexGraveyard.builder().addTombstone(new Index("test-index", "3q2423")).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void testSerDe() throws IOException {
}
}

private Metadata getGlobalMetadata() {
public static Metadata getGlobalMetadata() {
return Metadata.builder()
.templates(
TemplatesMetadata.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void testSerDe() throws IOException {
}
}

private DiffableStringMap getHashesOfConsistentSettings() {
public static DiffableStringMap getHashesOfConsistentSettings() {
Map<String, String> hashesOfConsistentSettings = new HashMap<>();
hashesOfConsistentSettings.put("secure-setting-key", "secure-setting-value");
return new DiffableStringMap(hashesOfConsistentSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void testSerDe() throws IOException {
}
}

private Settings getSettings() {
public static Settings getSettings() {
return Settings.builder().put("random_index_setting_" + randomAlphaOfLength(3), randomAlphaOfLength(5)).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void testSerDe() throws IOException {
}
}

private TemplatesMetadata getTemplatesMetadata() {
public static TemplatesMetadata getTemplatesMetadata() {
return TemplatesMetadata.builder()
.put(
IndexTemplateMetadata.builder("template" + randomAlphaOfLength(3))
Expand Down

0 comments on commit c0a12f2

Please sign in to comment.