integration-tests/src/test/java/oracle/kubernetes/operator/ItServerDiscovery.java
@Test
  public void testOpConnToNewMS() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);

    LoggerHelper.getLocal().log(Level.INFO, "Stop the Operator");
    operator.stopUsingReplicas();

    String cmd = "kubectl apply -f " + testDomainYamlFile;
    LoggerHelper.getLocal().log(Level.INFO, "Start a new managed server, managed-server3 using command:\n" + cmd);
    TestUtils.execOrAbortProcess(cmd);

    LoggerHelper.getLocal().log(Level.INFO, "Restart the Operator");
    operator.startUsingReplicas();

    LoggerHelper.getLocal().log(Level.INFO, "Check if the newly created managed-server3 is running");
    int replicas = 3;
    verifyPodReady(replicas);

    // restore the test env
    int msDecrNum = 1;
    scaleDownAndverify(msDecrNum);

    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
/**
   * Stop operator and apply the modified domain.yaml with replicas count increased. Restart
   * operator and make sure the cluster is scaled up accordingly.
   *
   * @throws Exception exception
   */
Stop operator and apply the modified domain.yaml with replicas count increased. Restart
operator and make sure the cluster is scaled up accordingly.

@throws Exception exception
Stop operator and apply the modified domain . yaml with replicas count increased . Restart operator and make sure the cluster is scaled up accordingly . @throws Exception exception
@Test
  public void testOpConnToNewMS() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    LoggerHelper.getLocal().log(Level.INFO, "Stop the Operator");
    operator.stopUsingReplicas();
    String cmd = "kubectl apply -f " + testDomainYamlFile;
    LoggerHelper.getLocal().log(Level.INFO, "Start a new managed server, managed-server3 using command:\n" + cmd);
    TestUtils.execOrAbortProcess(cmd);
    LoggerHelper.getLocal().log(Level.INFO, "Restart the Operator");
    operator.startUsingReplicas();
    LoggerHelper.getLocal().log(Level.INFO, "Check if the newly created managed-server3 is running");
    int replicas = 3;
    verifyPodReady(replicas);
    int msDecrNum = 1;
    scaleDownAndverify(msDecrNum);
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
@ Test public void testOpConnToNewMS ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Stop the Operator" ) ; operator . stopUsingReplicas ( ) ; String cmd = "kubectl apply -f " + testDomainYamlFile ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Start a new managed server, managed-server3 using command:\n" + cmd ) ; TestUtils . execOrAbortProcess ( cmd ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Restart the Operator" ) ; operator . startUsingReplicas ( ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Check if the newly created managed-server3 is running" ) ; int replicas = 3 ; verifyPodReady ( replicas ) ; int msDecrNum = 1 ; scaleDownAndverify ( msDecrNum ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - " + testMethodName ) ; }
Stop operator and apply the modified domain.yaml with replicas count increased.
Stop operator and apply the modified domain . yaml with replicas count increased .
// restore the test env