AbstractNotificationTest: Improve readability of failure message
Before:
1) createReviewableChangeWithReviewersAndCcs(com.google.gerrit.acceptance.server.mail.ChangeNotificationsIT)
name:
[
TO: hangeNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_ccer@example.com, eNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_reviewer@example.com, nsIT_revertChangeByOwnerCcingSelfInReviewDb_watchingProjectOwner@example.com
CC:
BCC: ficationsIT_revertChangeByOwnerCcingSelfInReviewDb_NEW_PATCHSETS@example.com, tificationsIT_revertChangeByOwnerCcingSelfInReviewDb_NEW_CHANGES@example.com
]
doesn't notify:
[
TO: hangeNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_ccer@example.com
]
This reads oddly: it sounds like it's claiming that the first block
doesn't contain an entry for "TO: ccer", when it plainly does.
After:
1) createReviewableChangeWithReviewersAndCcs(com.google.gerrit.acceptance.server.mail.ChangeNotificationsIT)
name:
[
TO: hangeNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_ccer@example.com, eNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_reviewer@example.com, nsIT_revertChangeByOwnerCcingSelfInReviewDb_watchingProjectOwner@example.com
CC:
BCC: ficationsIT_revertChangeByOwnerCcingSelfInReviewDb_NEW_PATCHSETS@example.com, tificationsIT_revertChangeByOwnerCcingSelfInReviewDb_NEW_CHANGES@example.com
]
shouldn't notify:
TO: hangeNotificationsIT_revertChangeByOwnerCcingSelfInReviewDb_ccer@example.com
Change-Id: Ifab2afacf1c572f0b3212e56a5c3c9362e724c7f
This commit is contained in:
@@ -195,8 +195,8 @@ public abstract class AbstractNotificationTest extends AbstractDaemonTest {
|
|||||||
if (recipients.get(type).contains(email) != expected) {
|
if (recipients.get(type).contains(email) != expected) {
|
||||||
failWithoutActual(
|
failWithoutActual(
|
||||||
fact(
|
fact(
|
||||||
expected ? "notifies" : "doesn't notify",
|
expected ? "should notify" : "shouldn't notify",
|
||||||
"[\n" + type + ": " + users.emailToName(email) + "\n]"));
|
type + ": " + users.emailToName(email)));
|
||||||
}
|
}
|
||||||
if (expected) {
|
if (expected) {
|
||||||
accountedFor.add(email);
|
accountedFor.add(email);
|
||||||
|
|||||||
Reference in New Issue
Block a user