summaryrefslogtreecommitdiffstats
path: root/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py')
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
index f72fb28..631f8d1 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
@@ -31,6 +31,8 @@ import unittest
from webkitpy.common.config.committers import Committer
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.tool.bot.flakytestreporter import FlakyTestReporter
from webkitpy.tool.mocktool import MockTool, MockStatusServer
@@ -49,6 +51,9 @@ class MockCommitInfo(object):
class FlakyTestReporterTest(unittest.TestCase):
+ def _mock_test_result(self, testname):
+ return test_results.TestResult(testname, [test_failures.FailureTextMismatch()])
+
def _assert_emails_for_test(self, emails):
tool = MockTool()
reporter = FlakyTestReporter(tool, 'dummy-queue')
@@ -75,7 +80,9 @@ FLAKE_MESSAGE
The bots will update this with information from each new failure.
-If you would like to track this test fix with another bug, please close this bug as a duplicate.
+If you believe this bug to be fixed or invalid, feel free to close. The bots will re-open if the flake re-occurs.
+
+If you would like to track this test fix with another bug, please close this bug as a duplicate. The bots will follow the duplicate chain when making future comments.
component: Tools / Tests
cc: test@test.com
@@ -110,12 +117,14 @@ foo/bar.html has been flaky on the dummy-queue.
foo/bar.html was authored by abarth@webkit.org.
http://trac.webkit.org/browser/trunk/LayoutTests/foo/bar.html
-The dummy-queue just saw foo/bar.html flake while processing attachment 197 on bug 42.
+The dummy-queue just saw foo/bar.html flake (Text diff mismatch) while processing attachment 197 on bug 42.
Bot: mock-bot-id Port: MockPort Platform: MockPlatform 1.0
The bots will update this with information from each new failure.
-If you would like to track this test fix with another bug, please close this bug as a duplicate.
+If you believe this bug to be fixed or invalid, feel free to close. The bots will re-open if the flake re-occurs.
+
+If you would like to track this test fix with another bug, please close this bug as a duplicate. The bots will follow the duplicate chain when making future comments.
component: Tools / Tests
cc: abarth@webkit.org
@@ -130,7 +139,8 @@ The dummy-queue is continuing to process your patch.
--- End comment ---
"""
- OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [['foo/bar.html'], patch], expected_stderr=expected_stderr)
+ test_results = [self._mock_test_result('foo/bar.html')]
+ OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [test_results, patch], expected_stderr=expected_stderr)
def test_optional_author_string(self):
reporter = FlakyTestReporter(MockTool(), 'dummy-queue')