Skip to content

Commit

Permalink
Fix test testReplicationCheckpointNotNullForSegRep to correctly pass …
Browse files Browse the repository at this point in the history
…engine factory.

Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Sep 5, 2022
1 parent c9fb1ed commit 1b4200b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ public void testReplicationCheckpointNullForDocRep() throws IOException {
/**
* Test that latestReplicationCheckpoint returns ReplicationCheckpoint for segrep enabled indices
*/
public void testReplicationCheckpointNotNullForSegReb() throws IOException {
Settings indexSettings = Settings.builder().put(IndexMetadata.SETTING_REPLICATION_TYPE, "SEGMENT").put(Settings.EMPTY).build();
final IndexShard indexShard = newStartedShard(indexSettings);
public void testReplicationCheckpointNotNullForSegRep() throws IOException {
final IndexShard indexShard = newStartedShard(randomBoolean(), settings, new NRTReplicationEngineFactory());
final ReplicationCheckpoint replicationCheckpoint = indexShard.getLatestReplicationCheckpoint();
assertNotNull(replicationCheckpoint);
closeShards(indexShard);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,8 @@ public static MapperService createMapperService() throws IOException {
* Exposes a translog associated with the given engine for testing purpose.
*/
public static Translog getTranslog(Engine engine) {
assert engine instanceof InternalEngine || engine instanceof NRTReplicationEngine : "only InternalEngines or NRTReplicationEngines have translogs, got: " + engine.getClass();
assert engine instanceof InternalEngine || engine instanceof NRTReplicationEngine
: "only InternalEngines or NRTReplicationEngines have translogs, got: " + engine.getClass();
engine.ensureOpen();
TranslogManager translogManager = engine.translogManager();
assert translogManager instanceof InternalTranslogManager : "only InternalTranslogManager have translogs, got: "
Expand Down

0 comments on commit 1b4200b

Please sign in to comment.