提交 ff672d9c 编写于 作者: K kohsuke

added another test.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33621 71c3de6d-444a-0410-be80-ed276b4c234a
上级 5c73b4eb
......@@ -47,7 +47,7 @@ public class LabelExpressionTest extends HudsonTestCase {
public void testQueueBehavior() throws Exception {
DumbSlave w32 = createSlave("win 32bit",null);
DumbSlave w64 = createSlave("win 64bit",null);
DumbSlave l32 = createSlave("linux 32bit",null);
createSlave("linux 32bit",null);
final SequenceLock seq = new SequenceLock();
......@@ -90,6 +90,28 @@ public class LabelExpressionTest extends HudsonTestCase {
assertSame(w32,b2.getBuiltOn());
}
/**
* Push the build around to different nodes via the assignment
* to make sure it gets where we need it to.
*/
public void testQueueBehavior2() throws Exception {
DumbSlave s = createSlave("win",null);
FreeStyleProject p = createFreeStyleProject();
p.setAssignedLabel(hudson.getLabel("!win"));
FreeStyleBuild b = assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(hudson,b.getBuiltOn());
p.setAssignedLabel(hudson.getLabel("win"));
b = assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(s,b.getBuiltOn());
p.setAssignedLabel(hudson.getLabel("!win"));
b = assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(hudson,b.getBuiltOn());
}
/**
* Tests the expression parser.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册