/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.util;

import alluxio.conf.InstancedConfiguration;
import alluxio.conf.PropertyKey;

import com.google.common.collect.Lists;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import java.util.List;

public final class JvmPauseMonitorTest {
  @Test
  @Ignore("https://alluxio.atlassian.net/browse/ALLUXIO-3059")
  public void monitorTest() {
    InstancedConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
    long gcSleepInterval = conf.getMs(PropertyKey.JVM_MONITOR_SLEEP_INTERVAL_MS);
    long warnThreshold = conf.getMs(PropertyKey.JVM_MONITOR_WARN_THRESHOLD_MS);
    long infoThreshold = conf.getMs(PropertyKey.JVM_MONITOR_INFO_THRESHOLD_MS);

    JvmPauseMonitor jvmPauseMonitor = new JvmPauseMonitor(gcSleepInterval, warnThreshold,
        infoThreshold);
    jvmPauseMonitor.start();
    List<String> list = Lists.newArrayList();
    int i = 0;
    while (true) {
      list.add(String.valueOf(i++));
      if (jvmPauseMonitor.getWarnTimeExceeded() != 0) {
        jvmPauseMonitor.stop();
        break;
      }
    }
    Assert.assertNotEquals(jvmPauseMonitor.getWarnTimeExceeded(), 0);
    Assert.assertNotEquals(jvmPauseMonitor.getTotalExtraTime(), 0);
  }
}

@@ -530,16 +530,65 @@
 .util;%0A%0A
+import static org.junit.Assert.assertNotEquals;%0A%0A
 import a
@@ -701,33 +701,8 @@
 ts;%0A
-import org.junit.Assert;%0A
 impo
@@ -1625,31 +1625,24 @@
 %7D%0A    %7D%0A    
-Assert.
 assertNotEqu
@@ -1692,23 +1692,16 @@
 0);%0A    
-Assert.
 assertNo

Use static imports for test utilities in JvmPauseMonitorTest