Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
7ed26b96
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看板
提交
7ed26b96
编写于
4月 15, 2011
作者:
O
okutsu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7035446: some regression tests take too long
Reviewed-by: peytoia
上级
72ad7203
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
15 deletion
+27
-15
test/java/text/Bidi/Bug6665028.java
test/java/text/Bidi/Bug6665028.java
+9
-3
test/java/util/Locale/Bug4518797.java
test/java/util/Locale/Bug4518797.java
+8
-3
test/java/util/ResourceBundle/Control/StressTest.java
test/java/util/ResourceBundle/Control/StressTest.java
+10
-9
未找到文件。
test/java/text/Bidi/Bug6665028.java
浏览文件 @
7ed26b96
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2011,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -28,7 +28,7 @@
* that this test case fails without the fix in some different ways,
* including timeout, due to the memory corruption.
* @build Bug6665028
* @run main/othervm
/timeout=60 -Xmx16m Bug6665028
* @run main/othervm
-Xmx16m Bug6665028 10
*/
import
java.awt.font.TextAttribute
;
...
...
@@ -36,6 +36,7 @@ import java.text.AttributedString;
import
java.text.Bidi
;
// test1() and test2() were derived from BidiEmbeddingTest.
// Usage: java Bug6665028 [duration]
public
class
Bug6665028
{
private
static
boolean
runrun
=
true
;
...
...
@@ -50,6 +51,11 @@ public class Bug6665028 {
}
public
static
void
main
(
String
[]
args
)
{
int
duration
=
45
;
if
(
args
.
length
==
1
)
{
duration
=
Math
.
max
(
1
,
Math
.
min
(
Integer
.
parseInt
(
args
[
0
]),
45
));
}
Test
[]
tests
=
new
Test
[
4
];
for
(
int
i
=
0
;
i
<
tests
.
length
;
i
++)
{
Test
t
=
new
Test
();
...
...
@@ -58,7 +64,7 @@ public class Bug6665028 {
}
try
{
Thread
.
sleep
(
45
000
);
Thread
.
sleep
(
duration
*
1
000
);
}
catch
(
InterruptedException
e
)
{
}
...
...
test/java/util/Locale/Bug4518797.java
浏览文件 @
7ed26b96
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2011,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,17 +24,22 @@
* @test
* @bug 4518797
* @summary Make sure that hashCode() and read/writeObject() are thread-safe.
* @run main
/timeout=200 Bug4518797
* @run main
Bug4518797 10
*/
import
java.util.*
;
import
java.io.*
;
// Usage: java Bug4518797 [duration]
public
class
Bug4518797
{
static
volatile
boolean
runrun
=
true
;
static
volatile
String
message
=
null
;
public
static
void
main
(
String
[]
args
)
{
int
duration
=
180
;
if
(
args
.
length
==
1
)
{
duration
=
Math
.
max
(
5
,
Integer
.
parseInt
(
args
[
0
]));
}
final
Locale
loc
=
new
Locale
(
"ja"
,
"US"
);
final
int
hashcode
=
loc
.
hashCode
();
...
...
@@ -84,7 +89,7 @@ public class Bug4518797 {
t1
.
start
();
t2
.
start
();
try
{
for
(
int
i
=
0
;
runrun
&&
i
<
180
;
i
++)
{
for
(
int
i
=
0
;
runrun
&&
i
<
duration
;
i
++)
{
Thread
.
sleep
(
1000
);
}
runrun
=
false
;
...
...
test/java/util/ResourceBundle/Control/StressTest.java
浏览文件 @
7ed26b96
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007,
2011,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,12 +24,13 @@
* @test
* @bug 5102289
* @summary Stress test for ResourceBundle.getBundle with ResourceBundle.Control.
* @run main/
timeout=300/othervm -esa StressTest
* @run main/
othervm -esa StressTest 2 15
*/
import
java.util.*
;
import
java.util.concurrent.atomic.*
;
// Usage: java StressTest [threadsFactor [duration]]
public
class
StressTest
{
static
final
Locale
ROOT_LOCALE
=
new
Locale
(
""
);
static
final
Random
rand
=
new
Random
();
...
...
@@ -60,16 +61,16 @@ public class StressTest {
static
volatile
boolean
runrun
=
true
;
public
static
void
main
(
String
[]
args
)
{
int
nThreads
=
2
;
int
threadsFactor
=
2
;
if
(
args
.
length
>
0
)
{
nThreads
=
Math
.
max
(
Integer
.
parseInt
(
args
[
0
]),
2
);
threadsFactor
=
Math
.
max
(
2
,
Integer
.
parseInt
(
args
[
0
])
);
}
int
nSeconds
=
180
;
int
duration
=
180
;
if
(
args
.
length
>
1
)
{
nSeconds
=
Integer
.
parseInt
(
args
[
1
]
);
duration
=
Math
.
max
(
5
,
Integer
.
parseInt
(
args
[
1
])
);
}
Locale
.
setDefault
(
Locale
.
US
);
Thread
[]
tasks
=
new
Thread
[
locales
.
length
*
nThreads
];
Thread
[]
tasks
=
new
Thread
[
locales
.
length
*
threadsFactor
];
counters
=
new
AtomicIntegerArray
(
tasks
.
length
);
for
(
int
i
=
0
;
i
<
tasks
.
length
;
i
++)
{
...
...
@@ -84,8 +85,8 @@ public class StressTest {
System
.
out
.
printf
(
"%d processors, intervalForCounterCheck = %d [sec]%n"
,
nProcessors
,
intervalForCounterCheck
);
try
{
for
(
int
i
=
0
;
runrun
&&
i
<
nSeconds
;
i
++)
{
Thread
.
sleep
(
1000
);
// 1 second
s
for
(
int
i
=
0
;
runrun
&&
i
<
duration
;
i
++)
{
Thread
.
sleep
(
1000
);
// 1 second
if
((
i
%
intervalForCounterCheck
)
==
0
)
{
checkCounters
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录