>emptyList());
hudson.addNode(slave);
return slave;
}
@@ -757,6 +760,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
* Create a new slave on the local host and wait for it to come online
* before returning
*/
+ @SuppressWarnings("deprecation")
public DumbSlave createOnlineSlave(Label l, EnvVars env) throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
ComputerListener waiter = new ComputerListener() {
@@ -833,6 +837,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
/**
* Performs a configuration round-trip testing for a builder.
*/
+ @SuppressWarnings("unchecked")
protected B configRoundtrip(B before) throws Exception {
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(before);
@@ -843,6 +848,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
/**
* Performs a configuration round-trip testing for a publisher.
*/
+ @SuppressWarnings("unchecked")
protected P configRoundtrip(P before) throws Exception {
FreeStyleProject p = createFreeStyleProject();
p.getPublishersList().add(before);
@@ -850,6 +856,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
return (P)p.getPublishersList().get(before.getClass());
}
+ @SuppressWarnings("unchecked")
protected C configRoundtrip(C before) throws Exception {
computerConnectorTester.connector = before;
submit(createWebClient().goTo("self/computerConnectorTester/configure").getFormByName("config"));
@@ -861,6 +868,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
return u;
}
+ @SuppressWarnings("unchecked")
protected N configRoundtrip(N node) throws Exception {
submit(createWebClient().goTo("/computer/" + node.getNodeName() + "/configure").getFormByName("config"));
return (N)hudson.getNode(node.getNodeName());
@@ -1542,6 +1550,8 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
* for accessing Hudson.
*/
public class WebClient extends com.gargoylesoftware.htmlunit.WebClient {
+ private static final long serialVersionUID = 5808915989048338267L;
+
public WebClient() {
// default is IE6, but this causes 'n.doScroll('left')' to fail in event-debug.js:1907 as HtmlUnit doesn't implement such a method,
// so trying something else, until we discover another problem.
@@ -1552,6 +1562,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
clients.add(this);
// make ajax calls run as post-action for predictable behaviors that simplify debugging
setAjaxController(new AjaxController() {
+ private static final long serialVersionUID = -5844060943564822678L;
public boolean processSynchron(HtmlPage page, WebRequestSettings settings, boolean async) {
return false;
}
@@ -1725,7 +1736,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
* a website on the internet, there's nothing wrong with using this method.)
*/
@Override
- public Page getPage(String url) throws IOException, FailingHttpStatusCodeException {
+ public P getPage(String url) throws IOException, FailingHttpStatusCodeException {
return super.getPage(url);
}