2362N/A * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. 2362N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @build HttpCallback HttpServer ClosedChannelList HttpTransaction AbstractCallback 0N/A * @summary proxy authentication username and password caching only works in serial case 0N/A * Run in othervm since the test sets system properties that are read by the 0N/A * networking stack and cached when the HTTP handler is invoked, and previous 0N/A * tests may already have invoked the HTTP handler. 0N/A //System.out.write (c); 0N/A /* T1 tests the client by sending 4 requests to 2 different realms 0N/A * in parallel. The client should recognise two pairs of dependent requests 0N/A * and execute the first of each pair in parallel. When they both succeed 0N/A * the second requests should be executed without calling the authenticator. 0N/A * The test succeeds if the authenticator was only called twice. 0N/A /* T2 tests to check that if initial authentication fails, the second will 0N/A * succeed, and the authenticator is called twice 0N/A /* This will be called several times */ 0N/A /* T3 tests proxy and server authentication. three threads request same 0N/A * resource at same time. Authenticator should be called once for server 0N/A * and once for proxy 0N/A except (
"Authenticator was called "+f+
" times. Should be 2");
0N/A except (
"Authenticator was called "+f+
" times. Should be: " +
2);
0N/A //System.out.println ("Authenticator called: " + getRequestingPrompt()); 0N/A //Thread.sleep (1000); 0N/A //} catch (InterruptedException e) {}