10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 6212146
27 * @summary URLConnection.connect() fails on JAR Entry it creates
28 * file handler leak
29 * @library /test/lib
30 * @build jdk.test.lib.JDKToolFinder
31 * jdk.test.lib.process.ProcessTools
32 * Test
33 * @run main/othervm TestDriver
34 */
35
36 import jdk.test.lib.JDKToolFinder;
37 import jdk.test.lib.process.ProcessTools;
38
39 import java.io.IOException;
40 import java.nio.file.Files;
41 import java.nio.file.Path;
42 import java.nio.file.Paths;
43
44 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
45
46 public class TestDriver {
47 private static final String BASE_DIR = System.getProperty("user.dir")
48 + "/jars/";
49 private static final String ARCHIVE_NAME = "test.jar";
50 private static final String CMD_ULIMIT = "ulimit -n 300;";
51
52 public static void main(String[] args)
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 6212146
27 * @summary URLConnection.connect() fails on JAR Entry it creates
28 * file handler leak
29 * @library /test/lib
30 * @run main/othervm TestDriver
31 */
32
33 import jdk.test.lib.JDKToolFinder;
34 import jdk.test.lib.process.ProcessTools;
35
36 import java.io.IOException;
37 import java.nio.file.Files;
38 import java.nio.file.Path;
39 import java.nio.file.Paths;
40
41 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
42
43 public class TestDriver {
44 private static final String BASE_DIR = System.getProperty("user.dir")
45 + "/jars/";
46 private static final String ARCHIVE_NAME = "test.jar";
47 private static final String CMD_ULIMIT = "ulimit -n 300;";
48
49 public static void main(String[] args)
|