samba4.ldap.notification.python flapping
Stefan Metzmacher
metze at samba.org
Fri Mar 11 09:21:13 UTC 2016
Am 11.03.2016 um 05:00 schrieb Andrew Bartlett:
> On Fri, 2016-03-11 at 16:22 +1300, Andrew Bartlett wrote:
>> On Fri, 2016-03-11 at 02:45 +0100, Stefan Metzmacher wrote:
>>>
>>> Hi Andrew,
>>>
>>>>
>>>>
>>>> Just a heads-up that I've seen this test fail spuriously on the
>>>> Catalyst Cloud.
>>>>
>>>> (Between all the different flapping tests, we get success about
>>>> 20-
>>>> 30%
>>>> of the time. )
>>> I also got that already...
>>>
>>>>
>>>>
>>>> Error 3 is TIME_LIMIT_EXCEEDED. Perhaps you can look into why
>>>> this
>>>> might happen?
>>> Because the server is too busy/slow :-(
>> Yeah, we push our VM pretty hard. The whole autobuild works in a 2
>> CPU, 4GB RAM VM.
>>
>>>
>>> In source4/dsdb/tests/python/notification.py, we need to change
>>> timeout=1 into timeout=2 (or similar) everywhere we don't expect
>>> ERR_TIME_LIMIT_EXCEEDED.
>> OK. Thanks,
I looked at it again and I think the following patch should
fix the flapping test.
We can't be sure the 5+1 async requests arrive at the server in
exactly the order the client submitted them.
We just need to make sure 5 return ERR_TIME_LIMIT_EXCEEDED and
one returns ERR_ADMIN_LIMIT_EXCEEDED.
Please review and push:-)
Thanks!
metze
-------------- next part --------------
From 84da169f045d974a68df50f937bb77839e063765 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 11 Mar 2016 10:16:27 +0100
Subject: [PATCH] s4:dsdb/test/notification: make test_invalid_filter more
resilient against ordering races
We saw a lot of flapping tests with:
[1793(11038)/1892 at 1h55m26s]
samba4.ldap.notification.python(ad_dc_ntvfs)(ad_dc_ntvfs)
UNEXPECTED(failure):
samba4.ldap.notification.python(ad_dc_ntvfs).__main__.LDAPNotificationTest.test_max_search(ad_dc_ntvfs)
REASON: Exception: Exception: Traceback (most recent call last):
File
"/memdisk/autobuild/fl/b1782183/samba/source4/dsdb/tests/python/notification.py",
line 181, in test_max_search
self.assertEquals(num, ERR_TIME_LIMIT_EXCEEDED)
AssertionError: 11 != 3
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
source4/dsdb/tests/python/notification.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/source4/dsdb/tests/python/notification.py b/source4/dsdb/tests/python/notification.py
index d799c91..a6dadfa 100755
--- a/source4/dsdb/tests/python/notification.py
+++ b/source4/dsdb/tests/python/notification.py
@@ -168,6 +168,8 @@ delete: otherLoginWorkstations
attrs=["name"],
controls=["notification:1"],
timeout=1)
+ num_admin_limit = 0
+ num_time_limit = 0
for i in xrange(0, max_notifications + 1):
try:
for msg in notifies[i]:
@@ -175,10 +177,15 @@ delete: otherLoginWorkstations
res = notifies[i].result()
self.fail()
except LdbError, (num, _):
- if i >= max_notifications:
- self.assertEquals(num, ERR_ADMIN_LIMIT_EXCEEDED)
- else:
- self.assertEquals(num, ERR_TIME_LIMIT_EXCEEDED)
+ if num == ERR_ADMIN_LIMIT_EXCEEDED:
+ num_admin_limit += 1
+ continue
+ if num == ERR_TIME_LIMIT_EXCEEDED:
+ num_time_limit += 1
+ continue
+ raise
+ self.assertEqual(num_admin_limit, 1)
+ self.assertEqual(num_time_limit, max_notifications)
def test_invalid_filter(self):
"""Testing invalid filters for notifications"""
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160311/8cf024c7/signature.sig>
More information about the samba-technical
mailing list