< prev index next >

test/java/util/logging/FileHandlerMaxLocksTest.java

Print this page
rev 17324 : 8181759: add explicit @build actions for jdk.test.lib classes in all :tier1 tests
Reviewed-by: duke
rev 17325 : imported patch 8181759-1


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8153955
  27  * @summary test the FileHandler's new property
  28  *  "java.util.logging.FileHandler.maxLocks" which will be present in
  29  *  "logging.properties" file with default value of 100. This property can be
  30  *  overriden by specifying this property in the custom config file.
  31  * @library /test/lib


  32  * @author rpatil
  33  * @run main/othervm FileHandlerMaxLocksTest
  34  */
  35 import java.io.File;
  36 import java.io.FileWriter;
  37 import java.io.IOException;
  38 import java.nio.file.Paths;
  39 import java.util.ArrayList;
  40 import java.util.List;
  41 import java.util.logging.FileHandler;
  42 import jdk.test.lib.util.FileUtils;
  43 
  44 public class FileHandlerMaxLocksTest {
  45 
  46     private static final String LOGGER_DIR = "logger-dir";
  47     private static final String MAX_LOCK_PROPERTY = "java.util.logging.FileHandler.maxLocks = 200";
  48     private static final String CONFIG_FILE_NAME = "logging.properties";
  49 
  50     public static void main(String[] args) throws Exception {
  51         File loggerDir = createLoggerDir();




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8153955
  27  * @summary test the FileHandler's new property
  28  *  "java.util.logging.FileHandler.maxLocks" which will be present in
  29  *  "logging.properties" file with default value of 100. This property can be
  30  *  overriden by specifying this property in the custom config file.
  31  * @library /test/lib
  32  * @build jdk.test.lib.Platform
  33  *        jdk.test.lib.util.FileUtils
  34  * @author rpatil
  35  * @run main/othervm FileHandlerMaxLocksTest
  36  */
  37 import java.io.File;
  38 import java.io.FileWriter;
  39 import java.io.IOException;
  40 import java.nio.file.Paths;
  41 import java.util.ArrayList;
  42 import java.util.List;
  43 import java.util.logging.FileHandler;
  44 import jdk.test.lib.util.FileUtils;
  45 
  46 public class FileHandlerMaxLocksTest {
  47 
  48     private static final String LOGGER_DIR = "logger-dir";
  49     private static final String MAX_LOCK_PROPERTY = "java.util.logging.FileHandler.maxLocks = 200";
  50     private static final String CONFIG_FILE_NAME = "logging.properties";
  51 
  52     public static void main(String[] args) throws Exception {
  53         File loggerDir = createLoggerDir();


< prev index next >