[NC-1581] Remove SyncMode CLI flag (#27)

* comment out the @Option annotation

* eliminate syncModeOptionMustBeUsed

* update to OverrideDefaultValuesIfKeyIsPresentInConfigFile

* unify on comment out approach
S. Matthew English 6 years ago committed by GitHub
parent 19cd63315d
commit b06bdbdcbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      pantheon/src/main/java/net/consensys/pantheon/cli/PantheonCommand.java
  2. 8
      pantheon/src/test/java/net/consensys/pantheon/cli/PantheonCommandTest.java

@ -182,12 +182,14 @@ public class PantheonCommand implements Runnable {
) )
private final Integer maxTrailingPeers = Integer.MAX_VALUE; private final Integer maxTrailingPeers = Integer.MAX_VALUE;
@Option( // TODO: Re-enable as per NC-1057/NC-1681
names = {"--sync-mode"}, // @Option(
paramLabel = MANDATORY_MODE_FORMAT_HELP, // names = {"--sync-mode"},
description = // paramLabel = MANDATORY_MODE_FORMAT_HELP,
"Synchronization mode (Value can be one of ${COMPLETION-CANDIDATES}, default: ${DEFAULT-VALUE})" // description =
) // "Synchronization mode (Value can be one of ${COMPLETION-CANDIDATES}, default:
// ${DEFAULT-VALUE})"
// )
private final SyncMode syncMode = DEFAULT_SYNC_MODE; private final SyncMode syncMode = DEFAULT_SYNC_MODE;
// Boolean option to indicate if the client have to sync against the ottoman test network // Boolean option to indicate if the client have to sync against the ottoman test network

@ -34,6 +34,7 @@ import java.util.Optional;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.io.Resources; import com.google.common.io.Resources;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.TemporaryFolder; import org.junit.rules.TemporaryFolder;
@ -227,7 +228,8 @@ public class PantheonCommandTest extends CommandTestAbstract {
anyBoolean(), anyBoolean(),
anyInt()); anyInt());
verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FAST)); // TODO: Re-enable as per NC-1057/NC-1681
// verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FAST));
assertThat(commandErrorOutput.toString()).isEmpty(); assertThat(commandErrorOutput.toString()).isEmpty();
@ -257,7 +259,8 @@ public class PantheonCommandTest extends CommandTestAbstract {
verify(mockControllerBuilder) verify(mockControllerBuilder)
.build(any(), eq(null), any(), eq(false), any(), eq(false), anyInt()); .build(any(), eq(null), any(), eq(false), any(), eq(false), anyInt());
verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FULL)); // TODO: Re-enable as per NC-1057/NC-1681
// verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FULL));
assertThat(commandErrorOutput.toString()).isEmpty(); assertThat(commandErrorOutput.toString()).isEmpty();
@ -408,6 +411,7 @@ public class PantheonCommandTest extends CommandTestAbstract {
assertThat(commandErrorOutput.toString()).isEmpty(); assertThat(commandErrorOutput.toString()).isEmpty();
} }
@Ignore
@Test @Test
public void syncModeOptionMustBeUsed() { public void syncModeOptionMustBeUsed() {

Loading…
Cancel
Save