From: Douglas Bagnall Date: Tue, 12 Jul 2016 02:07:13 +0000 (+1200) Subject: VLV tests: reduce test duplication hence elapsed time X-Git-Tag: tdb-1.3.10~338 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=929ec47c2a6716173e3d5e2ffa76684c3013cc30;p=thirdparty%2Fsamba.git VLV tests: reduce test duplication hence elapsed time This makes before/after lattice sparser for the slower tests. While we're doing that, some of the tests are changed to traverse the lattice in a different order just in case that matters. There is very little chance that any particular combination of before and after parameters will behave uniquely wrongly. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py index 660d5b6cdc6..1f5cf15b509 100644 --- a/source4/dsdb/tests/python/vlv.py +++ b/source4/dsdb/tests/python/vlv.py @@ -356,8 +356,8 @@ class VLVTests(samba.tests.TestCase): sort_control = "server_sort:1:0:%s" % attr res = None n = len(self.users) - for before in range(0, 9): - for after in range(0, 9): + for before in [10, 0, 3, 1, 4, 5, 2]: + for after in [0, 3, 1, 4, 5, 2, 7]: for offset in range(max(1, before - 2), min(n - after + 2, n)): if res is None: @@ -774,8 +774,8 @@ class VLVTests(samba.tests.TestCase): random.shuffle(gte_tests) res = None sort_control = "server_sort:1:0:%s" % attr - for before in range(0, 5): - for after in range(0, 7): + for before in [0, 1, 2, 4]: + for after in [0, 1, 3, 6]: for gte in gte_tests: if res is not None: cookie = get_cookie(res.controls, len(self.users)) @@ -816,8 +816,8 @@ class VLVTests(samba.tests.TestCase): random.shuffle(gte_tests) sort_control = "server_sort:1:0:%s" % attr - for before in range(0, 4): - for after in range(0, 5): + for before in [0, 1, 3]: + for after in [0, 4]: for gte in gte_tests: if attr == 'audio' and 0: import pdb