Files
gerrit/java/com/google
Dave Borowitz 0d085bef87 ChangeNotificationsIT: Consistently check sender queue is empty
In addition to testing the contents of the next email in the queue,
tests should also be asserting that there are no bogus emails being
sent. This can prevent bugs: for example, in PostReview, there is code
to suppress emails from the AddReviewersOp so that a single email can be
sent at the end. Now the tests will actually catch it if that
suppression breaks.

Change all the stage* methods to clear the sender before returning, so
that test methods are just inspecting the messages they intend to send.
Tests for emails generated by API calls that happen to be in the
implementation of stage* methods should be tested directly in dedicated
methods instead.

While we're in there, expand the failure messages to make such failures
easier to debug.

Change-Id: I49329a1ca82b4a060541dd3ebf32a0bb5214c994
2019-02-08 08:47:36 -08:00
..