mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
perftest: ad_dc_medley failing base search failed to catch exception
This meant it only happened once. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
4eeb43d06c
commit
6b7494f5e7
@ -38,6 +38,7 @@ from samba.auth import system_session
|
||||
from ldb import Message, MessageElement, Dn, LdbError
|
||||
from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
|
||||
from ldb import SCOPE_BASE, SCOPE_SUBTREE, SCOPE_ONELEVEL
|
||||
from ldb import ERR_NO_SUCH_OBJECT
|
||||
|
||||
parser = optparse.OptionParser("ad_dc_performance.py [options] <host>")
|
||||
sambaopts = options.SambaOptions(parser)
|
||||
@ -222,15 +223,19 @@ class UserTests(samba.tests.TestCase):
|
||||
attrs=['cn'])
|
||||
except LdbError as e:
|
||||
(num, msg) = e.args
|
||||
if num != 32:
|
||||
if num != ERR_NO_SUCH_OBJECT:
|
||||
raise
|
||||
|
||||
def _test_base_search_failing(self):
|
||||
pattern = 'missing%d' + self.ou
|
||||
for i in range(4000):
|
||||
self.ldb.search(pattern % i,
|
||||
scope=SCOPE_BASE,
|
||||
attrs=['cn'])
|
||||
try:
|
||||
self.ldb.search(pattern % i,
|
||||
scope=SCOPE_BASE,
|
||||
attrs=['cn'])
|
||||
except LdbError as (num, msg):
|
||||
if num != ERR_NO_SUCH_OBJECT:
|
||||
raise
|
||||
|
||||
def search_expression_list(self, expressions, rounds,
|
||||
attrs=['cn'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user