< prev index next >

test/java/net/httpclient/security/Driver.java

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /**
  27  * @test
  28  * @bug 8087112
  29  * @library /lib/testlibrary/


  30  * @build jdk.testlibrary.SimpleSSLContext jdk.testlibrary.Utils
  31  * @compile ../../../../com/sun/net/httpserver/LogFilter.java
  32  * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java
  33  * @compile ../ProxyServer.java
  34  * @build Security
  35  *
  36  * @run driver/timeout=60 Driver
  37  */
  38 
  39 /**
  40  * driver required for allocating free portnumbers and putting this number
  41  * into security policy file used in some tests.
  42  *
  43  * The tests are in Security.java and port number supplied in -Dport.number
  44  * and -Dport.number1 for tests that require a second free port
  45  */





  46 import java.util.ArrayList;
  47 import java.util.List;
  48 import java.util.stream.Collectors;
  49 import java.io.*;
  50 import java.net.*;
  51 
  52 import jdk.testlibrary.OutputAnalyzer;
  53 import jdk.testlibrary.Utils;
  54 
  55 /**
  56  * Driver for tests
  57  */
  58 public class Driver {
  59 
  60     public static void main(String[] args) throws Throwable {
  61         System.out.println("Starting Driver");
  62         runtest("1.policy", "1");
  63         runtest("10.policy", "10");
  64         runtest("11.policy", "11");
  65         runtest("12.policy", "12");
  66         System.out.println("DONE");
  67     }
  68 
  69     static class Logger extends Thread {
  70         private final OutputStream ps;




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /*
  27  * @test
  28  * @bug 8087112
  29  * @library /lib/testlibrary/
  30  * @modules java.httpclient
  31  *          jdk.httpserver
  32  * @build jdk.testlibrary.SimpleSSLContext jdk.testlibrary.Utils
  33  * @compile ../../../../com/sun/net/httpserver/LogFilter.java
  34  * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java
  35  * @compile ../ProxyServer.java
  36  * @build Security
  37  *
  38  * @run driver/timeout=60 Driver
  39  */
  40 
  41 /**
  42  * driver required for allocating free portnumbers and putting this number
  43  * into security policy file used in some tests.
  44  *
  45  * The tests are in Security.java and port number supplied in -Dport.number
  46  * and -Dport.number1 for tests that require a second free port
  47  */
  48 import java.io.File;
  49 import java.io.FileOutputStream;
  50 import java.io.IOException;
  51 import java.io.InputStream;
  52 import java.io.OutputStream;
  53 import java.util.ArrayList;
  54 import java.util.List;
  55 import java.util.stream.Collectors;


  56 
  57 import jdk.testlibrary.OutputAnalyzer;
  58 import jdk.testlibrary.Utils;
  59 
  60 /**
  61  * Driver for tests
  62  */
  63 public class Driver {
  64 
  65     public static void main(String[] args) throws Throwable {
  66         System.out.println("Starting Driver");
  67         runtest("1.policy", "1");
  68         runtest("10.policy", "10");
  69         runtest("11.policy", "11");
  70         runtest("12.policy", "12");
  71         System.out.println("DONE");
  72     }
  73 
  74     static class Logger extends Thread {
  75         private final OutputStream ps;


< prev index next >