@@ -193,7 +193,7 @@ public void testJobUrlHandling_withJobNameAndRemoteUrl() throws IOException {
193193 config .setJob ("MyJob" );
194194 config .setRemoteJenkinsUrl ("http://test:8080" );
195195 assertEquals ("MyJob" , config .getJob ());
196- assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
196+ assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
197197 }
198198
199199 @ Test @ WithoutJenkins
@@ -204,7 +204,7 @@ public void testJobUrlHandling_withJobNameAndRemoteName() throws IOException {
204204
205205 config .setRemoteJenkinsName ("remoteJenkinsName" );
206206 assertEquals ("MyJob" , config .getJob ());
207- assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
207+ assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
208208 }
209209
210210 @ Test @ WithoutJenkins
@@ -215,15 +215,15 @@ public void testJobUrlHandling_withMultiFolderJobNameAndRemoteName() throws IOEx
215215
216216 config .setRemoteJenkinsName ("remoteJenkinsName" );
217217 assertEquals ("A/B/C/D/MyJob" , config .getJob ());
218- assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
218+ assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
219219 }
220220
221221 @ Test @ WithoutJenkins
222222 public void testJobUrlHandling_withJobUrl () throws IOException {
223223 RemoteBuildConfiguration config = new RemoteBuildConfiguration ();
224224 config .setJob ("http://test:8080/job/folder/job/MyJob" );
225225 assertEquals ("http://test:8080/job/folder/job/MyJob" , config .getJob ()); //The value configured for "job"
226- assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
226+ assertEquals ("http://test:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
227227 }
228228
229229 @ Test @ WithoutJenkins
@@ -233,7 +233,7 @@ public void testJobUrlHandling_withJobUrlAndRemoteUrl() throws IOException {
233233 config .setJob ("http://testA:8080/job/folder/job/MyJobA" );
234234 config .setRemoteJenkinsUrl ("http://testB:8080" );
235235 assertEquals ("http://testA:8080/job/folder/job/MyJobA" , config .getJob ()); //The value configured for "job"
236- assertEquals ("http://testA:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
236+ assertEquals ("http://testA:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
237237 }
238238
239239 @ Test @ WithoutJenkins
@@ -245,7 +245,7 @@ public void testJobUrlHandling_withJobUrlAndRemoteName() throws IOException {
245245
246246 config .setRemoteJenkinsName ("remoteJenkinsName" );
247247 assertEquals ("http://testA:8080/job/folder/job/MyJobA" , config .getJob ()); //The value configured for "job"
248- assertEquals ("http://testA:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
248+ assertEquals ("http://testA:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
249249 }
250250
251251 @ Test @ WithoutJenkins
@@ -270,12 +270,12 @@ public void testRemoteUrlOverridesRemoteName() throws IOException {
270270 config = mockGlobalRemoteHost (config , "remoteJenkinsName" , "http://globallyConfigured:8080" );
271271
272272 config .setRemoteJenkinsName ("remoteJenkinsName" );
273- assertEquals ("http://globallyConfigured:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
273+ assertEquals ("http://globallyConfigured:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
274274
275275 //Now override remote host URL
276276 config .setRemoteJenkinsUrl ("http://locallyOverridden:8080" );
277277 assertEquals ("MyJob" , config .getJob ());
278- assertEquals ("http://locallyOverridden:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
278+ assertEquals ("http://locallyOverridden:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
279279 }
280280
281281 @ Test @ WithoutJenkins
@@ -312,7 +312,7 @@ public void testEvaluateEffectiveRemoteHost_globalConfigMissing_localOverrideHos
312312
313313 config .setRemoteJenkinsName ("notConfiguredRemoteHost" );
314314 config .setRemoteJenkinsUrl ("http://locallyOverridden:8080" );
315- assertEquals ("http://locallyOverridden:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
315+ assertEquals ("http://locallyOverridden:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
316316 }
317317
318318 @ Test @ WithoutJenkins
@@ -322,15 +322,15 @@ public void testEvaluateEffectiveRemoteHost_globalConfigMissing_localOverrideJob
322322 config = mockGlobalRemoteHost (config , "remoteJenkinsName" , "http://globallyConfigured:8080" );
323323
324324 config .setRemoteJenkinsName ("notConfiguredRemoteHost" );
325- assertEquals ("http://localJobUrl:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
325+ assertEquals ("http://localJobUrl:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
326326 }
327327
328328 @ Test @ WithoutJenkins
329329 public void testEvaluateEffectiveRemoteHost_localOverrideHostURL () throws IOException {
330330 RemoteBuildConfiguration config = new RemoteBuildConfiguration ();
331331 config .setJob ("MyJob" );
332332 config .setRemoteJenkinsUrl ("http://hostname:8080" );
333- assertEquals ("http://hostname:8080" , config .evaluateEffectiveRemoteHost (null ).getRemoteAddress ());
333+ assertEquals ("http://hostname:8080" , config .evaluateEffectiveRemoteHost (null ).getAddress ());
334334 }
335335
336336 @ Test @ WithoutJenkins
@@ -384,7 +384,7 @@ public void testRemoveHashParameters() {
384384 }
385385
386386 @ Test @ WithoutJenkins
387- public void testGenerateJobUrl () throws MalformedURLException {
387+ public void testGenerateJobUrl () throws MalformedURLException , AbortException {
388388 RemoteJenkinsServer remoteServer = new RemoteJenkinsServer ();
389389 remoteServer .setAddress ("https://server:8080/jenkins" );
390390
@@ -411,8 +411,8 @@ public void testGenerateJobUrl() throws MalformedURLException {
411411 try {
412412 RemoteJenkinsServer missingUrl = new RemoteJenkinsServer ();
413413 RemoteBuildConfiguration .generateJobUrl (missingUrl , "JobName" );
414- Assert .fail ("Expected RuntimeException " );
415- } catch (RuntimeException e ) {}
414+ Assert .fail ("Expected AbortException " );
415+ } catch (AbortException e ) {}
416416
417417 }
418418
0 commit comments