hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestNodeManager.java
@Test
  public void testScmSanityOfUserConfig1() throws IOException,
      InterruptedException, TimeoutException {
    OzoneConfiguration conf = getConf();
    final int interval = 100;
    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, interval,
        MILLISECONDS);
    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_INTERVAL, 1, SECONDS);

    // This should be 5 times more than  OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL
    // and 3 times more than OZONE_SCM_HEARTBEAT_INTERVAL
    conf.setTimeDuration(OZONE_SCM_STALENODE_INTERVAL, interval, MILLISECONDS);

    thrown.expect(IllegalArgumentException.class);

    // This string is a multiple of the interval value
    thrown.expectMessage(
        startsWith("100 is not within min = 500 or max = 100000"));
    createNodeManager(conf);
  }
/**
   * Asserts that if user provides a value less than 5 times the heartbeat
   * interval as the StaleNode Value, we throw since that is a QoS that we
   * cannot maintain.
   *
   * @throws IOException
   * @throws InterruptedException
   * @throws TimeoutException
   */
Asserts that if user provides a value less than 5 times the heartbeat
interval as the StaleNode Value, we throw since that is a QoS that we
cannot maintain.


Asserts that if user provides a value less than 5 times the heartbeat interval as the StaleNode Value we throw since that is a QoS that we cannot maintain .
@Test
  public void testScmSanityOfUserConfig1() throws IOException,
      InterruptedException, TimeoutException {
    OzoneConfiguration conf = getConf();
    final int interval = 100;
    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, interval,
        MILLISECONDS);
    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(OZONE_SCM_STALENODE_INTERVAL, interval, MILLISECONDS);
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(
        startsWith("100 is not within min = 500 or max = 100000"));
    createNodeManager(conf);
  }
@ Test public void testScmSanityOfUserConfig1 ( ) throws IOException , InterruptedException , TimeoutException { OzoneConfiguration conf = getConf ( ) ; final int interval = 100 ; conf . setTimeDuration ( OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL , interval , MILLISECONDS ) ; conf . setTimeDuration ( OZONE_SCM_HEARTBEAT_INTERVAL , 1 , SECONDS ) ; conf . setTimeDuration ( OZONE_SCM_STALENODE_INTERVAL , interval , MILLISECONDS ) ; thrown . expect ( IllegalArgumentException . class ) ; thrown . expectMessage ( startsWith ( "100 is not within min = 500 or max = 100000" ) ) ; createNodeManager ( conf ) ; }
Asserts that if user provides a value less than 5 times the heartbeat
 interval as the StaleNode Value, we throw since that is a QoS that we
 cannot maintain.
Asserts that if user provides a value less than 5 times the heartbeat interval as the StaleNode Value we throw since that is a QoS that we cannot maintain .
// This should be 5 times more than  OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL // and 3 times more than OZONE_SCM_HEARTBEAT_INTERVAL // This string is a multiple of the interval value