Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5b2c05ff
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看板
提交
5b2c05ff
编写于
3月 14, 2013
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7183800: TEST_BUG: Update tests to run on Ubuntu 12.04 (localhost is 127.0.1.1)
Reviewed-by: alanb, chegar Contributed-by: yiming.wang@oracle.com
上级
0c5454bf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
9 deletion
+24
-9
test/java/nio/channels/DatagramChannel/Connect.java
test/java/nio/channels/DatagramChannel/Connect.java
+4
-0
test/java/nio/channels/DatagramChannel/ConnectedSend.java
test/java/nio/channels/DatagramChannel/ConnectedSend.java
+13
-5
test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java
...nnels/spi/SelectorProvider/inheritedChannel/Launcher.java
+5
-2
test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java
...ment/remote/mandatory/connection/RMIConnectionIdTest.java
+2
-2
未找到文件。
test/java/nio/channels/DatagramChannel/Connect.java
浏览文件 @
5b2c05ff
...
...
@@ -22,6 +22,7 @@
*/
/* @test
* @bug 4313882 7183800
* @summary Test DatagramChannel's send and receive methods
* @author Mike McCloskey
*/
...
...
@@ -88,6 +89,9 @@ public class Connect {
bb
.
put
(
"hello"
.
getBytes
());
bb
.
flip
();
InetAddress
address
=
InetAddress
.
getLocalHost
();
if
(
address
.
isLoopbackAddress
())
{
address
=
InetAddress
.
getLoopbackAddress
();
}
InetSocketAddress
isa
=
new
InetSocketAddress
(
address
,
port
);
dc
.
connect
(
isa
);
dc
.
write
(
bb
);
...
...
test/java/nio/channels/DatagramChannel/ConnectedSend.java
浏览文件 @
5b2c05ff
...
...
@@ -22,7 +22,7 @@
*/
/* @test
* @bug 4849277
* @bug 4849277
7183800
* @summary Test DatagramChannel send while connected
* @author Mike McCloskey
*/
...
...
@@ -46,14 +46,18 @@ public class ConnectedSend {
DatagramChannel
sndChannel
=
DatagramChannel
.
open
();
sndChannel
.
socket
().
bind
(
null
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
if
(
address
.
isLoopbackAddress
())
{
address
=
InetAddress
.
getLoopbackAddress
();
}
InetSocketAddress
sender
=
new
InetSocketAddress
(
InetAddress
.
getLocalHost
()
,
address
,
sndChannel
.
socket
().
getLocalPort
());
DatagramChannel
rcvChannel
=
DatagramChannel
.
open
();
rcvChannel
.
socket
().
bind
(
null
);
InetSocketAddress
receiver
=
new
InetSocketAddress
(
InetAddress
.
getLocalHost
()
,
address
,
rcvChannel
.
socket
().
getLocalPort
());
rcvChannel
.
connect
(
sender
);
...
...
@@ -80,14 +84,18 @@ public class ConnectedSend {
private
static
void
test2
()
throws
Exception
{
DatagramChannel
sndChannel
=
DatagramChannel
.
open
();
sndChannel
.
socket
().
bind
(
null
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
if
(
address
.
isLoopbackAddress
())
{
address
=
InetAddress
.
getLoopbackAddress
();
}
InetSocketAddress
sender
=
new
InetSocketAddress
(
InetAddress
.
getLocalHost
()
,
address
,
sndChannel
.
socket
().
getLocalPort
());
DatagramChannel
rcvChannel
=
DatagramChannel
.
open
();
rcvChannel
.
socket
().
bind
(
null
);
InetSocketAddress
receiver
=
new
InetSocketAddress
(
InetAddress
.
getLocalHost
()
,
address
,
rcvChannel
.
socket
().
getLocalPort
());
rcvChannel
.
connect
(
sender
);
...
...
test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java
浏览文件 @
5b2c05ff
...
...
@@ -133,8 +133,11 @@ public class Launcher {
dc
.
close
();
dc
=
DatagramChannel
.
open
();
InetSocketAddress
isa
=
new
InetSocketAddress
(
InetAddress
.
getLocalHost
(),
port
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
if
(
address
.
isLoopbackAddress
())
{
address
=
InetAddress
.
getLoopbackAddress
();
}
InetSocketAddress
isa
=
new
InetSocketAddress
(
address
,
port
);
dc
.
connect
(
isa
);
return
dc
;
...
...
test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java
浏览文件 @
5b2c05ff
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 4901808
* @bug 4901808
7183800
* @summary Check that RMI connection ids include client host name
* @author Eamonn McManus
* @run clean RMIConnectionIdTest
...
...
@@ -60,7 +60,7 @@ public class RMIConnectionIdTest {
}
String
clientAddr
=
rest
.
substring
(
0
,
spaceIndex
);
InetAddress
clientInetAddr
=
InetAddress
.
getByName
(
clientAddr
);
InetAddress
localAddr
=
InetAddress
.
getLocalHost
();
InetAddress
localAddr
=
clientInetAddr
.
isLoopbackAddress
()
?
InetAddress
.
getLoopbackAddress
()
:
InetAddress
.
getLocalHost
();
System
.
out
.
println
(
"InetAddresses: local="
+
localAddr
+
"; "
+
"connectionId="
+
clientInetAddr
);
if
(!
localAddr
.
equals
(
clientInetAddr
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录