Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2677d57f
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2677d57f
编写于
3月 25, 2010
作者:
C
chegar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6937703: java/net regression test issues with samevm
Reviewed-by: alanb
上级
0bde254d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
72 addition
and
35 deletion
+72
-35
test/ProblemList.txt
test/ProblemList.txt
+0
-7
test/java/net/ProxySelector/B6737819.java
test/java/net/ProxySelector/B6737819.java
+6
-0
test/java/net/ResponseCache/ResponseCacheTest.java
test/java/net/ResponseCache/ResponseCacheTest.java
+8
-4
test/java/net/ResponseCache/getResponseCode.java
test/java/net/ResponseCache/getResponseCode.java
+8
-5
test/java/net/URL/TestIPv6Addresses.java
test/java/net/URL/TestIPv6Addresses.java
+4
-0
test/java/net/URLClassLoader/HttpTest.java
test/java/net/URLClassLoader/HttpTest.java
+11
-2
test/java/net/URLConnection/B5052093.java
test/java/net/URLConnection/B5052093.java
+25
-15
test/java/net/URLConnection/contentHandler/UserContentHandler.java
.../net/URLConnection/contentHandler/UserContentHandler.java
+10
-2
未找到文件。
test/ProblemList.txt
浏览文件 @
2677d57f
...
@@ -684,8 +684,6 @@ java/net/SocketInputStream/SocketClosedException.java generic-all
...
@@ -684,8 +684,6 @@ java/net/SocketInputStream/SocketClosedException.java generic-all
java/net/SocketInputStream/SocketTimeout.java generic-all
java/net/SocketInputStream/SocketTimeout.java generic-all
# Linux i586, address already in use or timeout, samevm issues
# Linux i586, address already in use or timeout, samevm issues
java/net/URLConnection/B5052093.java generic-all
java/net/URLConnection/contentHandler/UserContentHandler.java generic-all
java/net/URLConnection/DisconnectAfterEOF.java generic-all
java/net/URLConnection/DisconnectAfterEOF.java generic-all
java/net/URLConnection/HandleContentTypeWithAttrs.java generic-all
java/net/URLConnection/HandleContentTypeWithAttrs.java generic-all
java/net/URLConnection/Responses.java generic-all
java/net/URLConnection/Responses.java generic-all
...
@@ -696,8 +694,6 @@ java/net/URLConnection/ZeroContentLength.java generic-all
...
@@ -696,8 +694,6 @@ java/net/URLConnection/ZeroContentLength.java generic-all
java/net/ResponseCache/B6181108.java generic-all
java/net/ResponseCache/B6181108.java generic-all
java/net/ResponseCache/ResponseCacheTest.java generic-all
java/net/ResponseCache/ResponseCacheTest.java generic-all
java/net/URL/GetContent.java generic-all
java/net/URL/GetContent.java generic-all
java/net/URL/TestIPv6Addresses.java generic-all
java/net/URLClassLoader/HttpTest.java generic-all
java/net/URLConnection/HttpContinueStackOverflow.java generic-all
java/net/URLConnection/HttpContinueStackOverflow.java generic-all
java/net/URLConnection/Redirect307Test.java generic-all
java/net/URLConnection/Redirect307Test.java generic-all
java/net/URLConnection/RedirectLimit.java generic-all
java/net/URLConnection/RedirectLimit.java generic-all
...
@@ -726,9 +722,6 @@ sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java generic-all
...
@@ -726,9 +722,6 @@ sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java generic-all
# Connection refused, windows samevm
# Connection refused, windows samevm
sun/net/www/protocol/http/DigestTest.java generic-all
sun/net/www/protocol/http/DigestTest.java generic-all
# Fails on Fedora 9 32bit & 64bit & Solaris 10, wrong proxy for http://localhost/index.html
java/net/ProxySelector/B6737819.java generic-all
############################################################################
############################################################################
# jdk_nio
# jdk_nio
...
...
test/java/net/ProxySelector/B6737819.java
浏览文件 @
2677d57f
...
@@ -23,9 +23,15 @@
...
@@ -23,9 +23,15 @@
/*
/*
* @test
* @test
* @bug 6737819
* @bug 6737819
* @run main/othervm B6737819
* @summary sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
* @summary sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
*/
*/
/* Run in othervm mode since the test sets HTTP proxy system properties that
* are read once and cached by the protocol handler. A previous test using the
* HTTP handler may run and these system properties may be ignored for this test.
*/
import
java.net.ProxySelector
;
import
java.net.ProxySelector
;
import
java.net.Proxy
;
import
java.net.Proxy
;
import
java.net.URI
;
import
java.net.URI
;
...
...
test/java/net/ResponseCache/ResponseCacheTest.java
浏览文件 @
2677d57f
...
@@ -150,10 +150,14 @@ static class NameVerifier implements HostnameVerifier {
...
@@ -150,10 +150,14 @@ static class NameVerifier implements HostnameVerifier {
}
}
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
ResponseCache
.
setDefault
(
new
MyResponseCache
());
try
{
FNPrefix
=
System
.
getProperty
(
"test.src"
,
"."
)+
"/"
;
ResponseCache
.
setDefault
(
new
MyResponseCache
());
OutFNPrefix
=
System
.
getProperty
(
"test.scratch"
,
"."
)+
"/"
;
FNPrefix
=
System
.
getProperty
(
"test.src"
,
"."
)+
"/"
;
new
ResponseCacheTest
();
OutFNPrefix
=
System
.
getProperty
(
"test.scratch"
,
"."
)+
"/"
;
new
ResponseCacheTest
();
}
finally
{
ResponseCache
.
setDefault
(
null
);
}
}
}
static
class
MyResponseCache
extends
ResponseCache
{
static
class
MyResponseCache
extends
ResponseCache
{
...
...
test/java/net/ResponseCache/getResponseCode.java
浏览文件 @
2677d57f
...
@@ -30,8 +30,7 @@
...
@@ -30,8 +30,7 @@
import
java.net.*
;
import
java.net.*
;
import
java.util.*
;
import
java.util.*
;
import
java.io.*
;
import
java.io.*
;
import
java.nio.*
;
import
sun.net.www.ParseUtil
;
/**
/**
* Request should get serviced by the cache handler. Response get
* Request should get serviced by the cache handler. Response get
...
@@ -52,9 +51,13 @@ public class getResponseCode {
...
@@ -52,9 +51,13 @@ public class getResponseCode {
}
}
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
public
static
void
main
(
String
args
[])
throws
Exception
{
ResponseCache
.
setDefault
(
new
MyResponseCache
());
try
{
FNPrefix
=
System
.
getProperty
(
"test.src"
,
"."
)+
"/"
;
ResponseCache
.
setDefault
(
new
MyResponseCache
());
new
getResponseCode
();
FNPrefix
=
System
.
getProperty
(
"test.src"
,
"."
)+
"/"
;
new
getResponseCode
();
}
finally
{
ResponseCache
.
setDefault
(
null
);
}
}
}
static
class
MyResponseCache
extends
ResponseCache
{
static
class
MyResponseCache
extends
ResponseCache
{
...
...
test/java/net/URL/TestIPv6Addresses.java
浏览文件 @
2677d57f
...
@@ -23,8 +23,12 @@
...
@@ -23,8 +23,12 @@
/* @test
/* @test
* @bug 4451522 4460484
* @bug 4451522 4460484
* @run main/othervm TestIPv6Addresses
* @summary URI and URL getHost() methods don't comform to RFC 2732
* @summary URI and URL getHost() methods don't comform to RFC 2732
*/
*/
// Run in othervm because the tests sets a SecurityManager
import
java.net.*
;
import
java.net.*
;
public
class
TestIPv6Addresses
{
public
class
TestIPv6Addresses
{
...
...
test/java/net/URLClassLoader/HttpTest.java
浏览文件 @
2677d57f
...
@@ -56,9 +56,9 @@ public class HttpTest {
...
@@ -56,9 +56,9 @@ public class HttpTest {
}
}
public
void
run
()
{
public
void
run
()
{
InputStream
in
=
null
;
try
{
try
{
in
=
s
.
getInputStream
();
InputStream
in
=
s
.
getInputStream
();
for
(;;)
{
for
(;;)
{
// read entire request from client
// read entire request from client
...
@@ -111,6 +111,9 @@ public class HttpTest {
...
@@ -111,6 +111,9 @@ public class HttpTest {
}
// for
}
// for
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
unexpected
(
e
);
}
finally
{
if
(
in
!=
null
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
unexpected
(
e
);}
}
}
}
}
}
}
}
...
@@ -131,6 +134,11 @@ public class HttpTest {
...
@@ -131,6 +134,11 @@ public class HttpTest {
}
}
}
}
void
unexpected
(
Exception
e
)
{
System
.
out
.
println
(
e
);
e
.
printStackTrace
();
}
public
static
HttpServer
create
()
throws
Exception
{
public
static
HttpServer
create
()
throws
Exception
{
if
(
svr
!=
null
)
if
(
svr
!=
null
)
return
svr
;
return
svr
;
...
@@ -211,6 +219,7 @@ public class HttpTest {
...
@@ -211,6 +219,7 @@ public class HttpTest {
// one GET request
// one GET request
svr
.
counters
().
reset
();
svr
.
counters
().
reset
();
InputStream
in
=
cl
.
getResourceAsStream
(
"foo2.gif"
);
InputStream
in
=
cl
.
getResourceAsStream
(
"foo2.gif"
);
in
.
close
();
System
.
out
.
println
(
svr
.
counters
());
System
.
out
.
println
(
svr
.
counters
());
if
(
svr
.
counters
().
getCount
()
>
1
)
{
if
(
svr
.
counters
().
getCount
()
>
1
)
{
failed
=
true
;
failed
=
true
;
...
...
test/java/net/URLConnection/B5052093.java
浏览文件 @
2677d57f
/*
/*
* Copyright
(c)
2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* published by the Free Software Foundation.
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
...
@@ -66,17 +64,29 @@ public class B5052093 implements HttpCallback {
...
@@ -66,17 +64,29 @@ public class B5052093 implements HttpCallback {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
server
=
new
HttpServer
(
new
B5052093
(),
1
,
10
,
0
);
server
=
new
HttpServer
(
new
B5052093
(),
1
,
10
,
0
);
URL
url
=
new
URL
(
"http://localhost:"
+
server
.
getLocalPort
()+
"/foo"
);
try
{
URLConnection
conn
=
url
.
openConnection
();
URL
url
=
new
URL
(
"http://localhost:"
+
server
.
getLocalPort
()+
"/foo"
);
int
i
=
conn
.
getContentLength
();
URLConnection
conn
=
url
.
openConnection
();
long
l
=
conn
.
getContentLengthLong
();
int
i
=
conn
.
getContentLength
();
if
(
i
!=
-
1
||
l
!=
testSize
)
long
l
=
conn
.
getContentLengthLong
();
throw
new
RuntimeException
(
"Wrong content-length from http"
);
if
(
i
!=
-
1
||
l
!=
testSize
)
{
System
.
out
.
println
(
"conn.getContentLength = "
+
i
);
System
.
out
.
println
(
"conn.getContentLengthLong = "
+
l
);
System
.
out
.
println
(
"testSize = "
+
testSize
);
throw
new
RuntimeException
(
"Wrong content-length from http"
);
}
URLConnection
fu
=
new
LargeFileURLConnection
(
new
LargeFile
());
URLConnection
fu
=
new
LargeFileURLConnection
(
new
LargeFile
());
i
=
fu
.
getContentLength
();
i
=
fu
.
getContentLength
();
l
=
fu
.
getContentLengthLong
();
l
=
fu
.
getContentLengthLong
();
if
(
i
!=
-
1
||
l
!=
testSize
)
if
(
i
!=
-
1
||
l
!=
testSize
)
{
throw
new
RuntimeException
(
"Wrong content-length from file"
);
System
.
out
.
println
(
"fu.getContentLength = "
+
i
);
System
.
out
.
println
(
"fu.getContentLengthLong = "
+
l
);
System
.
out
.
println
(
"testSize = "
+
testSize
);
throw
new
RuntimeException
(
"Wrong content-length from file"
);
}
}
finally
{
server
.
terminate
();
}
}
}
}
}
test/java/net/URLConnection/contentHandler/UserContentHandler.java
浏览文件 @
2677d57f
...
@@ -25,8 +25,16 @@
...
@@ -25,8 +25,16 @@
* @bug 4191147
* @bug 4191147
* @summary 1.2beta4 does not load user defined content handlers
* @summary 1.2beta4 does not load user defined content handlers
* @build UserContentHandler
* @build UserContentHandler
* @run main UserContentHandler
* @run main
/othervm
UserContentHandler
*/
*/
/* Run in othervm mode since the test sets a system property, java.content.handler.pkgs,
* that prepends a specific package prefix defining a text/plain content
* handler. If other URLConnection tests run before this one they might trigger
* the Sun implementation text/plain content handler in sun.net.www.content
* to be loaded and cached, this will break this test.
*/
import
java.net.*
;
import
java.net.*
;
import
java.io.*
;
import
java.io.*
;
import
java.util.*
;
import
java.util.*
;
...
@@ -55,7 +63,7 @@ public class UserContentHandler implements Runnable {
...
@@ -55,7 +63,7 @@ public class UserContentHandler implements Runnable {
// don't close the connection immediately as otherwise
// don't close the connection immediately as otherwise
// the http headers may not have been received and the
// the http headers may not have been received and the
// http client will re-connect.
// http client will re-connect.
Thread
.
currentThread
().
sleep
(
2000
);
Thread
.
sleep
(
2000
);
s
.
close
();
s
.
close
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录