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.Utils
34 * jdk.test.lib.Asserts
35 * jdk.test.lib.JDKToolFinder
36 * jdk.test.lib.JDKToolLauncher
37 * jdk.test.lib.process.*
38 * jdk.test.lib.util.FileUtils
39 * @author rpatil
40 * @run main/othervm FileHandlerMaxLocksTest
41 */
42 import java.io.File;
43 import java.io.FileWriter;
44 import java.io.IOException;
45 import java.nio.file.Paths;
46 import java.util.ArrayList;
47 import java.util.List;
48 import java.util.logging.FileHandler;
49 import jdk.test.lib.util.FileUtils;
50
51 public class FileHandlerMaxLocksTest {
52
53 private static final String LOGGER_DIR = "logger-dir";
54 private static final String MAX_LOCK_PROPERTY = "java.util.logging.FileHandler.maxLocks = 200";
55 private static final String CONFIG_FILE_NAME = "logging.properties";
56
57 public static void main(String[] args) throws Exception {
58 File loggerDir = createLoggerDir();
|