From 8f6c7c20d6bf50f6556d807dfc5782c06df2ccc9 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 17 May 2019 10:40:19 +0200 Subject: [FIX] test_mail: bump query count Oversight of previous forward-port. --- addons/test_mail/tests/test_performance.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'addons/test_mail/tests/test_performance.py') diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index fde3ffcada8..4f0d93b2643 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -196,7 +196,7 @@ class TestAdvMailPerformance(TransactionCase): self.user_test.write({'notification_type': 'email'}) record = self.env['mail.test.track'].create({'name': 'Test'}) - with self.assertQueryCount(margin=1, admin=83, emp=105): # test_mail only: 81 - 103 + with self.assertQueryCount(margin=1, admin=84, emp=106): # test_mail only: 81 - 103 record.write({ 'user_id': self.user_test.id, }) @@ -372,7 +372,7 @@ class TestHeavyMailPerformance(TransactionCase): }) mail_ids = mail.ids - with self.assertQueryCount(admin=15, emp=23): # test_mail only: 13 - 21 + with self.assertQueryCount(admin=16, emp=24): # test_mail only: 13 - 21 self.env['mail.mail'].browse(mail_ids).send() self.assertEqual(mail.body_html, '

Test

') @@ -385,7 +385,7 @@ class TestHeavyMailPerformance(TransactionCase): self.umbrella.message_subscribe(self.user_portal.partner_id.ids) record = self.umbrella.sudo(self.env.user) - with self.assertQueryCount(admin=116, emp=147): # com runbot 114 - 141 // test_mail only: 110 - 137 + with self.assertQueryCount(admin=118, emp=149): # com runbot 114 - 141 // test_mail only: 110 - 137 record.message_post( body='

Test Post Performances

', message_type='comment', @@ -402,7 +402,7 @@ class TestHeavyMailPerformance(TransactionCase): record = self.umbrella.sudo(self.env.user) template_id = self.env.ref('test_mail.mail_test_tpl').id - with self.assertQueryCount(admin=135, emp=178): # com runbot 133 - 172 // test_mail only: 129 - 168 + with self.assertQueryCount(admin=137, emp=180): # com runbot 133 - 172 // test_mail only: 129 - 168 record.message_post_with_template(template_id, message_type='comment', composition_mode='comment') self.assertEqual(record.message_ids[0].body, '

Adding stuff on %s

' % record.name) @@ -472,7 +472,7 @@ class TestHeavyMailPerformance(TransactionCase): }) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id) - with self.assertQueryCount(admin=85, emp=108): # test_mail only: 82 - 106 + with self.assertQueryCount(admin=86, emp=109): # test_mail only: 82 - 106 rec.write({'user_id': self.user_portal.id}) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) @@ -495,7 +495,7 @@ class TestHeavyMailPerformance(TransactionCase): customer_id = self.customer.id user_id = self.user_portal.id - with self.assertQueryCount(margin=1, admin=239, emp=284): # com runbot: 239 - 282 // test_mail only: 232 - 277 + with self.assertQueryCount(margin=1, admin=244, emp=290): # com runbot: 239 - 282 // test_mail only: 232 - 277 rec = self.env['mail.test.full'].create({ 'name': 'Test', 'umbrella_id': umbrella_id, @@ -524,7 +524,7 @@ class TestHeavyMailPerformance(TransactionCase): }) self.assertEqual(rec.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) - with self.assertQueryCount(admin=149, emp=175): # test_mail only: 144 - 171 + with self.assertQueryCount(admin=153, emp=179): # test_mail only: 144 - 171 rec.write({ 'name': 'Test2', 'umbrella_id': self.umbrella.id, @@ -562,7 +562,7 @@ class TestHeavyMailPerformance(TransactionCase): }) self.assertEqual(rec.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id) - with self.assertQueryCount(admin=154, emp=180): # test_mail only: 149 - 175 + with self.assertQueryCount(admin=157, emp=183): # test_mail only: 149 - 175 rec.write({ 'name': 'Test2', 'umbrella_id': umbrella_id, @@ -596,7 +596,7 @@ class TestHeavyMailPerformance(TransactionCase): }) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) - with self.assertQueryCount(admin=57, emp=78): # test_mail only: 55 - 76 + with self.assertQueryCount(admin=58, emp=79): # test_mail only: 55 - 76 rec.write({ 'name': 'Test2', 'customer_id': customer_id, -- cgit v1.2.3 From 37bca6ae5001d76789dc5c02bdbdfab9ddb557fa Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 17 May 2019 11:48:43 +0200 Subject: [FIX] test_mail: bump again query count Enterprise make more queries... --- addons/test_mail/tests/test_performance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/test_mail/tests/test_performance.py') diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 4f0d93b2643..f433c6a303a 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -250,7 +250,7 @@ class TestAdvMailPerformance(TransactionCase): def test_message_post_one_email_notification(self): record = self.env['mail.test.simple'].create({'name': 'Test'}) - with self.assertQueryCount(margin=1, admin=76, emp=102): # com runbot: 74 - 97 // test_mail only: 72 - 95 + with self.assertQueryCount(margin=1, admin=78, emp=104): # com runbot: 74 - 97 // test_mail only: 72 - 95 record.message_post( body='

Test Post Performances with an email ping

', partner_ids=self.customer.ids, @@ -385,7 +385,7 @@ class TestHeavyMailPerformance(TransactionCase): self.umbrella.message_subscribe(self.user_portal.partner_id.ids) record = self.umbrella.sudo(self.env.user) - with self.assertQueryCount(admin=118, emp=149): # com runbot 114 - 141 // test_mail only: 110 - 137 + with self.assertQueryCount(admin=120, emp=151): # com runbot 114 - 141 // test_mail only: 110 - 137 record.message_post( body='

Test Post Performances

', message_type='comment', @@ -402,7 +402,7 @@ class TestHeavyMailPerformance(TransactionCase): record = self.umbrella.sudo(self.env.user) template_id = self.env.ref('test_mail.mail_test_tpl').id - with self.assertQueryCount(admin=137, emp=180): # com runbot 133 - 172 // test_mail only: 129 - 168 + with self.assertQueryCount(admin=139, emp=182): # com runbot 133 - 172 // test_mail only: 129 - 168 record.message_post_with_template(template_id, message_type='comment', composition_mode='comment') self.assertEqual(record.message_ids[0].body, '

Adding stuff on %s

' % record.name) -- cgit v1.2.3 From 94aa43722e80497806328d08b356b219143fbfbd Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 2 Aug 2019 14:38:06 +0200 Subject: [FIX] test_mail: bump expected query count 324268a9763d9ba223f66326ff0e2d2731617e40 has the side effect of generating an extra query. --- addons/test_mail/tests/test_performance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/test_mail/tests/test_performance.py') diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index f433c6a303a..faec00c5dd0 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -472,7 +472,7 @@ class TestHeavyMailPerformance(TransactionCase): }) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id) - with self.assertQueryCount(admin=86, emp=109): # test_mail only: 82 - 106 + with self.assertQueryCount(admin=87, emp=109): # test_mail only: 82 - 106 rec.write({'user_id': self.user_portal.id}) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) -- cgit v1.2.3