-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[tests] ensure that the notifier is emptied by each test #8822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests] ensure that the notifier is emptied by each test #8822
Conversation
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, otherwise LGTM
beforeEach(function () { | ||
if (Notifier.prototype._notifs.length) { | ||
Notifier.prototype._notifs.length = 0; | ||
throw new TypeError('notifications were left in the notifier'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like a TypeError to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
habit :)
--------- **Commit 1:** [tests] ensure that the notifier is emptied by each test * Original sha: 0cdef8c * Authored by spalger <[email protected]> on 2016-10-25T00:09:57Z **Commit 2:** [testHarness] use generic Error class * Original sha: 34659fb * Authored by spalger <[email protected]> on 2016-10-25T22:11:39Z
[backport] PR #8822 to 5.x - [tests] ensure that the notifier is emptied by each test
--------- **Commit 1:** [tests] ensure that the notifier is emptied by each test * Original sha: 11e9af0d765960bcf586bbebe2d9309b1506d264 [formerly 0cdef8c] * Authored by spalger <[email protected]> on 2016-10-25T00:09:57Z **Commit 2:** [testHarness] use generic Error class * Original sha: d7e994e720ebdb6a2c0cd499936956ad1fe1fbee [formerly 34659fb] * Authored by spalger <[email protected]> on 2016-10-25T22:11:39Z Former-commit-id: cfb469b
[backport] PR elastic#8822 to 5.x - [tests] ensure that the notifier is emptied by each test Former-commit-id: 9e7afe5
While working on #8734 I noticed that:
This fixes these issues by checking before each test run that notifications were properly cleared out after the last test.