@Test public void testIsDiskHealthy() { boolean tmpHealthy = UtilService.isTempDiskHealthy(); assertTrue(tmpHealthy); }
public static boolean isTempDiskHealthy() { File tmpDir = new File(System.getProperty("java.io.tmpdir")); long space = tmpDir.getUsableSpace(); if (space < DISK_SPACE_LEFT_FOR_WARNING) { logger.error("Java is reporting very low disk usable space in {} dir: only {} bytes available", tmpDir, space); return false; } else { logger.debug("Usable space is {}", space); } return true; }
UtilService { public static boolean isTempDiskHealthy() { File tmpDir = new File(System.getProperty("java.io.tmpdir")); long space = tmpDir.getUsableSpace(); if (space < DISK_SPACE_LEFT_FOR_WARNING) { logger.error("Java is reporting very low disk usable space in {} dir: only {} bytes available", tmpDir, space); return false; } else { logger.debug("Usable space is {}", space); } return true; } }
UtilService { public static boolean isTempDiskHealthy() { File tmpDir = new File(System.getProperty("java.io.tmpdir")); long space = tmpDir.getUsableSpace(); if (space < DISK_SPACE_LEFT_FOR_WARNING) { logger.error("Java is reporting very low disk usable space in {} dir: only {} bytes available", tmpDir, space); return false; } else { logger.debug("Usable space is {}", space); } return true; }  }
UtilService { public static boolean isTempDiskHealthy() { File tmpDir = new File(System.getProperty("java.io.tmpdir")); long space = tmpDir.getUsableSpace(); if (space < DISK_SPACE_LEFT_FOR_WARNING) { logger.error("Java is reporting very low disk usable space in {} dir: only {} bytes available", tmpDir, space); return false; } else { logger.debug("Usable space is {}", space); } return true; }  static ObjectNode getInfo(); static boolean isDbHealthy(); static boolean isTempDiskHealthy(); }
UtilService { public static boolean isTempDiskHealthy() { File tmpDir = new File(System.getProperty("java.io.tmpdir")); long space = tmpDir.getUsableSpace(); if (space < DISK_SPACE_LEFT_FOR_WARNING) { logger.error("Java is reporting very low disk usable space in {} dir: only {} bytes available", tmpDir, space); return false; } else { logger.debug("Usable space is {}", space); } return true; }  static ObjectNode getInfo(); static boolean isDbHealthy(); static boolean isTempDiskHealthy();  }