20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8048020
27 * @author Daniel Fuchs
28 * @summary Regression on java.util.logging.FileHandler.
29 * The fix is to avoid filling up the file system with zombie lock files.
30 *
31 * @run main/othervm CheckZombieLockTest WRITABLE CLOSE CLEANUP
32 * @run main/othervm CheckZombieLockTest CLEANUP
33 * @run main/othervm CheckZombieLockTest WRITABLE
34 * @run main/othervm CheckZombieLockTest CREATE_FIRST
35 * @run main/othervm CheckZombieLockTest CREATE_NEXT
36 * @run main/othervm CheckZombieLockTest CREATE_NEXT
37 * @run main/othervm CheckZombieLockTest CLEANUP
38 * @run main/othervm CheckZombieLockTest REUSE
39 * @run main/othervm CheckZombieLockTest CLEANUP
40 */
41 import java.io.File;
42 import java.io.IOException;
43 import java.nio.channels.FileChannel;
44 import java.nio.file.Paths;
45 import java.nio.file.StandardOpenOption;
46 import java.util.ArrayList;
47 import java.util.List;
48 import java.util.UUID;
49 import java.util.logging.FileHandler;
50 import java.util.logging.Level;
51 import java.util.logging.LogRecord;
52 public class CheckZombieLockTest {
53
54 private static final String WRITABLE_DIR = "writable-lockfile-dir";
55 private static volatile boolean supportsLocking = true;
56
57 static enum TestCase {
58 WRITABLE, // just verifies that we can create a file in our 'writable-lockfile-dir'
59 CLOSE, // checks that closing a FileHandler removes its lock file
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8048020
27 * @author Daniel Fuchs
28 * @summary Regression on java.util.logging.FileHandler.
29 * The fix is to avoid filling up the file system with zombie lock files.
30 *
31 * @run main/othervm CheckZombieLockTest WRITABLE CLOSE CLEANUP
32 * @run main/othervm CheckZombieLockTest CLEANUP
33 * @run main/othervm CheckZombieLockTest WRITABLE
34 * @run main/othervm CheckZombieLockTest CREATE_FIRST
35 * @run main/othervm CheckZombieLockTest CREATE_NEXT
36 * @run main/othervm CheckZombieLockTest CREATE_NEXT
37 * @run main/othervm CheckZombieLockTest CLEANUP
38 * @run main/othervm CheckZombieLockTest REUSE
39 * @run main/othervm CheckZombieLockTest CLEANUP
40 * @key randomness
41 */
42 import java.io.File;
43 import java.io.IOException;
44 import java.nio.channels.FileChannel;
45 import java.nio.file.Paths;
46 import java.nio.file.StandardOpenOption;
47 import java.util.ArrayList;
48 import java.util.List;
49 import java.util.UUID;
50 import java.util.logging.FileHandler;
51 import java.util.logging.Level;
52 import java.util.logging.LogRecord;
53 public class CheckZombieLockTest {
54
55 private static final String WRITABLE_DIR = "writable-lockfile-dir";
56 private static volatile boolean supportsLocking = true;
57
58 static enum TestCase {
59 WRITABLE, // just verifies that we can create a file in our 'writable-lockfile-dir'
60 CLOSE, // checks that closing a FileHandler removes its lock file
|