diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-05-12 11:52:53 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-05-12 11:55:44 +0000 |
| commit | b04f7e71aa9381ad6e73a41851a45429df4115d3 (patch) | |
| tree | e2139435d77c2df28245d0fb83467c5b080338ff | |
| parent | 4b77794e58dce94933b2a1609e4a2177a0666c7f (diff) | |
[IMP] test_(mass_)mail(ing): update counters to current runbot results
Spotted when working on task ID 2238597
| -rw-r--r-- | addons/test_mail/tests/test_performance.py | 22 | ||||
| -rw-r--r-- | addons/test_mass_mailing/tests/test_performance.py | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index d273c80dfe8..078f8778799 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -260,7 +260,7 @@ class TestMailAPIPerformance(BaseMailPerformance): self._create_test_records() test_record = self.env['mail.test.ticket'].browse(self.test_record_full.id) customer_id = self.customer.id - with self.assertQueryCount(__system__=4, emp=4): + with self.assertQueryCount(__system__=2, emp=2): composer = self.env['mail.compose.message'].with_context({ 'default_composition_mode': 'comment', 'default_model': test_record._name, @@ -270,7 +270,7 @@ class TestMailAPIPerformance(BaseMailPerformance): 'partner_ids': [(4, customer_id)], }) - with self.assertQueryCount(__system__=31, emp=37): + with self.assertQueryCount(__system__=29, emp=32): composer.send_mail() @users('__system__', 'emp') @@ -281,7 +281,7 @@ class TestMailAPIPerformance(BaseMailPerformance): test_record = self.env['mail.test.ticket'].browse(self.test_record_full.id) test_template = self.env['mail.template'].browse(self.test_template_full.id) # TODO FIXME non deterministic, last check 25 Mar 2020. Runbot at most +7 compared to local. - with self.assertQueryCount(__system__=28, emp=30): + with self.assertQueryCount(__system__=12, emp=14): composer = self.env['mail.compose.message'].with_context({ 'default_composition_mode': 'comment', 'default_model': test_record._name, @@ -290,7 +290,7 @@ class TestMailAPIPerformance(BaseMailPerformance): }).create({}) composer.onchange_template_id_wrapper() - with self.assertQueryCount(__system__=40, emp=45): + with self.assertQueryCount(__system__=39, emp=42): composer.send_mail() # remove created partner to ensure tests are the same each run @@ -311,7 +311,7 @@ class TestMailAPIPerformance(BaseMailPerformance): @warmup def test_message_assignation_inbox(self): record = self.env['mail.test.track'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=19, emp=22): + with self.assertQueryCount(__system__=18, emp=21): record.write({ 'user_id': self.user_test.id, }) @@ -367,7 +367,7 @@ class TestMailAPIPerformance(BaseMailPerformance): def test_message_post_one_inbox_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(__system__=15, emp=18): + with self.assertQueryCount(__system__=14, emp=17): record.message_post( body='<p>Test Post Performances with an inbox ping</p>', partner_ids=self.user_test.partner_id.ids, @@ -631,7 +631,7 @@ class TestMailComplexPerformance(BaseMailPerformance): rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) self.assertEqual(len(rec1.message_ids), 1) - with self.assertQueryCount(__system__=83, emp=83): + with self.assertQueryCount(__system__=82, emp=82): rec.write({ 'name': 'Test2', 'container_id': self.container.id, @@ -668,7 +668,7 @@ class TestMailComplexPerformance(BaseMailPerformance): rec1 = rec.with_context(active_test=False) # to see inactive records self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) - with self.assertQueryCount(__system__=91, emp=91): + with self.assertQueryCount(__system__=90, emp=90): rec.write({ 'name': 'Test2', 'container_id': container_id, @@ -817,7 +817,7 @@ class TestMailComplexPerformance(BaseMailPerformance): ] }]) - with self.assertQueryCount(emp=6): + with self.assertQueryCount(emp=5): res = messages.message_format() self.assertEqual(len(res), 2) for message in res: @@ -826,7 +826,7 @@ class TestMailComplexPerformance(BaseMailPerformance): messages.flush() messages.invalidate_cache() - with self.assertQueryCount(emp=18): + with self.assertQueryCount(emp=17): res = messages.message_format() self.assertEqual(len(res), 2) for message in res: @@ -951,7 +951,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance): ] self.attachements = self.env['ir.attachment'].with_user(self.env.user).create(self.vals) attachement_ids = self.attachements.ids - with self.assertQueryCount(emp=86): + with self.assertQueryCount(emp=85): self.cr.sql_log = self.warm and self.cr.sql_log_count record.with_context({}).message_post( body='<p>Test body <img src="cid:cid1"> <img src="cid:cid2"></p>', diff --git a/addons/test_mass_mailing/tests/test_performance.py b/addons/test_mass_mailing/tests/test_performance.py index 956db8969e7..d106247ad73 100644 --- a/addons/test_mass_mailing/tests/test_performance.py +++ b/addons/test_mass_mailing/tests/test_performance.py @@ -51,7 +51,7 @@ class TestMassMailPerformance(TestMassMailPerformanceBase): }) # runbot needs +50 compared to local - with self.assertQueryCount(__system__=1916, marketing=1917): + with self.assertQueryCount(__system__=1913, marketing=1914): mailing.action_send_mail() self.assertEqual(mailing.sent, 50) |
