From 665b62b5c95fa43d7fe313f0ba695d6929dfdb2e Mon Sep 17 00:00:00 2001 From: Markus Winter Date: Fri, 31 May 2024 20:29:20 +0200 Subject: [PATCH] fix test --- test/src/test/java/hudson/model/NodeTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()); } }