Skip to content

Commit

Permalink
Merge pull request #1 from v1v/nullcauseTestCase
Browse files Browse the repository at this point in the history
[FIXED JENKINS-30220] Add UnitTest: validate null Causes
  • Loading branch information
v1v committed Aug 31, 2015
2 parents 2505935 + 49b98e2 commit 53ddf57
Showing 1 changed file with 16 additions and 0 deletions.
Expand Up @@ -99,6 +99,22 @@ private MailWatcherMailer installComputerListener(MailWatcherMailer mailer) {
return mailer;
}

@Test @Bug(30220)
public void notifyWhenSlaveBecomesOfflineWithoutCause() throws Exception {
MailWatcherMailer mailer = mock(MailWatcherMailer.class);
installComputerListener(mailer);

j.jenkins.getGlobalNodeProperties().add(new WatcherNodeProperty(
"on.online@mailinator.com", "on.offline@mailinator.com"
));

final Computer computer = j.jenkins.toComputer();
computer.setTemporarilyOffline(true, null);
computer.setTemporarilyOffline(false, null);

assertNotified(mailer);
}

@Test @Bug(23496)
public void notifyWhenSlaveBecomesAwailable() throws Exception {
MailWatcherMailer mailer = mock(MailWatcherMailer.class);
Expand Down

0 comments on commit 53ddf57

Please sign in to comment.