From ca624d7ae610476167695f3ffa2ecbfc259a6b61 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 22 Aug 2021 19:23:05 +0200 Subject: [PATCH] RSS: Fix nondeterministic test failures Caused by 'rss announce add' triggering headline announces, that would delay the execution of the 'remove' commands. Thanks to @mapreri and @Unit193 for help in reproducing the issue and confirming the patch. --- plugins/RSS/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py index 5a2b52a6a..d4614e381 100644 --- a/plugins/RSS/test.py +++ b/plugins/RSS/test.py @@ -103,9 +103,14 @@ class RSSTestCase(ChannelPluginTestCase): @mock_urllib def testRemoveAliasedFeed(self, mock): - mock._data = xkcd_new + mock._data = xkcd_old try: self.assertNotError('rss announce add http://xkcd.com/rss.xml') + + # Clear the queue or it's going to mess up the finally block + self.assertRegexp(' ', 'Snake Facts') + self.assertNoResponse(' ') + self.assertNotError('rss add xkcd http://xkcd.com/rss.xml') finally: self.assertNotError('rss announce remove http://xkcd.com/rss.xml')