Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
53f90962
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53f90962
编写于
9月 01, 2015
作者:
V
Valentina Armenise
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[JENKINS-30084] new location and implementation of the test
上级
88443b08
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
27 deletion
+23
-27
test/src/test/java/hudson/model/QueueTest.java
test/src/test/java/hudson/model/QueueTest.java
+23
-0
test/src/test/java/hudson/model/queue/WideExecutionTest.java
test/src/test/java/hudson/model/queue/WideExecutionTest.java
+0
-27
未找到文件。
test/src/test/java/hudson/model/QueueTest.java
浏览文件 @
53f90962
...
...
@@ -30,6 +30,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlPage;
import
com.gargoylesoftware.htmlunit.xml.XmlPage
;
import
hudson.Launcher
;
import
hudson.XmlFile
;
import
hudson.matrix.Axis
;
import
hudson.matrix.AxisList
;
import
hudson.matrix.LabelAxis
;
import
hudson.matrix.MatrixBuild
;
...
...
@@ -41,6 +42,7 @@ import hudson.model.Cause.UserIdCause;
import
hudson.model.Queue.BlockedItem
;
import
hudson.model.Queue.Executable
;
import
hudson.model.Queue.WaitingItem
;
import
hudson.model.labels.LabelExpression
;
import
hudson.model.queue.AbstractQueueTask
;
import
hudson.model.queue.QueueTaskFuture
;
import
hudson.model.queue.ScheduleResult
;
...
...
@@ -780,4 +782,25 @@ public class QueueTest {
"B finished at "
+
buildBEndTime
+
", C started at "
+
buildC
.
getStartTimeInMillis
(),
buildC
.
getStartTimeInMillis
()
>=
buildBEndTime
);
}
@Issue
(
"JENKINS-30084"
)
@Test
/*
* this is to test that when the assigned executor is not available the flyweighttask is put into the buildable list,
* thus the node will be provisioned.
* when the flyweight task is not assigned to an offline executors the buildable list is empty.
*
*/
public
void
flyWeightTaskQueue
()
throws
Exception
{
MatrixProject
project
=
r
.
createMatrixProject
();
project
.
setAxes
(
new
AxisList
(
new
Axis
(
"axis"
,
"a"
,
"b"
)
));
DummyCloudImpl
dummyCloud
=
new
DummyCloudImpl
(
r
,
0
);
dummyCloud
.
label
=
LabelExpression
.
get
(
"aws-linux-dummy"
);
r
.
getInstance
().
clouds
.
add
(
dummyCloud
);
project
.
setAssignedLabel
(
LabelExpression
.
get
(
"aws-linux-dummy"
));
r
.
assertBuildStatusSuccess
(
project
.
scheduleBuild2
(
0
));
}
}
test/src/test/java/hudson/model/queue/WideExecutionTest.java
浏览文件 @
53f90962
...
...
@@ -95,33 +95,6 @@ public class WideExecutionTest {
}
}
@Issue
(
"JENKINS-30084"
)
@Test
/*
* this is to test that when the assigned executor is not available the flyweighttask is put into the buildable list,
* thus the node will be provisioned.
* when the flyweight task is not assigned to an offline executors the buildable list is empty.
*
*/
public
void
flyWeightTaskQueue
()
throws
IOException
{
MatrixProject
project2
=
j
.
createMatrixProject
();
project2
.
setAxes
(
new
AxisList
(
new
Axis
(
"axis"
,
"a"
,
"b"
)
));
project2
.
scheduleBuild2
(
0
);
Queue
.
getInstance
().
maintain
();
assertTrue
(
Queue
.
getInstance
().
getBuildableItems
().
isEmpty
());
MatrixProject
project
=
j
.
createMatrixProject
();
project
.
setAxes
(
new
AxisList
(
new
Axis
(
"axis"
,
"a"
,
"b"
)
));
project
.
setAssignedLabel
(
LabelExpression
.
get
(
"aws-linux"
));
project
.
scheduleBuild2
(
0
);
Queue
.
getInstance
().
maintain
();
assertTrue
(
Queue
.
getInstance
().
getBuildableItems
().
get
(
0
).
task
.
equals
(
project
));
assertEquals
(
Queue
.
getInstance
().
getBuildableItems
().
get
(
0
).
getAssignedLabel
().
getExpression
(),
"aws-linux"
);
}
@Test
public
void
run
()
throws
Exception
{
FreeStyleProject
p
=
j
.
createFreeStyleProject
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录