diff --git a/test/src/test/java/hudson/model/NodeTest.java b/test/src/test/java/hudson/model/NodeTest.java index 2b685eb2dfbb..0e7233290bf5 100644 --- a/test/src/test/java/hudson/model/NodeTest.java +++ b/test/src/test/java/hudson/model/NodeTest.java @@ -172,7 +172,7 @@ public void testDisconnectDoesNotOverwriteTemporarilyOfflineCause() throws Excep computer.doToggleOffline("original message"); cause = (OfflineCause.UserCause) computer.getTemporarilyOfflineCause(); assertTrue(cause.toString(), cause.toString().matches("^.*?Marked temporarily offline by someone@somewhere.com : original message")); - assertThat(computer.getTemporarilyOfflineCauseReason(), equalTo("Marked temporarily offline by someone@somewhere.com : original message")); + assertThat(computer.getTemporarilyOfflineCauseReason(), equalTo("original message")); assertEquals(someone, cause.getUser()); } @@ -181,12 +181,12 @@ public void testDisconnectDoesNotOverwriteTemporarilyOfflineCause() throws Excep ((SlaveComputer) computer).doDoDisconnect("disconnect message"); cause = (OfflineCause.UserCause) computer.getTemporarilyOfflineCause(); assertTrue(cause.toString(), cause.toString().matches("^.*?Marked temporarily offline by someone@somewhere.com : original message")); - assertThat(computer.getTemporarilyOfflineCauseReason(), equalTo("Marked temporarily offline by someone@somewhere.com : original message")); + assertThat(computer.getTemporarilyOfflineCauseReason(), equalTo("original message")); assertEquals(someone, cause.getUser()); cause = (OfflineCause.UserCause) computer.getOfflineCause(); assertTrue(cause.toString(), cause.toString().matches("^.*?Disconnected by root@localhost : disconnect message")); - assertThat(computer.getOfflineCauseReason(), equalTo("Disconnected by root@localhost : disconnect message")); + assertThat(computer.getOfflineCauseReason(), equalTo("disconnect message")); assertEquals(root, cause.getUser()); } }