This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
commit dd7a9fa7b79f030bca16d54a3769f9e7915e9791
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 20 10:54:33 2017 -0400
Ticket 49295 - Fix latest CI test failures
Description: This is round one of trying fix the CI tests
Note - test 48944 is very inconsistent and needs more
investigation
https://pagure.io/389-ds-base/issue/49295
Reviewed by: simon(Thanks!)
---
.../tests/stress/replication/mmr_01_4m_test.py | 4 +-
dirsrvtests/tests/suites/plugins/accpol_test.py | 12 ++--
dirsrvtests/tests/tickets/ticket47653MMR_test.py | 5 +-
dirsrvtests/tests/tickets/ticket48194_test.py | 75 +++-------------------
dirsrvtests/tests/tickets/ticket48212_test.py | 17 ++---
dirsrvtests/tests/tickets/ticket48944_test.py | 9 +--
dirsrvtests/tests/tickets/ticket48956_test.py | 8 ++-
dirsrvtests/tests/tickets/ticket49039_test.py | 4 +-
8 files changed, 42 insertions(+), 92 deletions(-)
diff --git a/dirsrvtests/tests/stress/replication/mmr_01_4m_test.py
b/dirsrvtests/tests/stress/replication/mmr_01_4m_test.py
index b7d677e..88eb400 100644
--- a/dirsrvtests/tests/stress/replication/mmr_01_4m_test.py
+++ b/dirsrvtests/tests/stress/replication/mmr_01_4m_test.py
@@ -16,8 +16,8 @@ logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
DEBUGGING = False
-ADD_DEL_COUNT = 5000
-MAX_LOOPS = 5
+ADD_DEL_COUNT = 50000
+MAX_LOOPS = 2
TEST_CONVERGE_LATENCY = True
CONVERGENCE_TIMEOUT = '60'
master_list = []
diff --git a/dirsrvtests/tests/suites/plugins/accpol_test.py
b/dirsrvtests/tests/suites/plugins/accpol_test.py
index f3fc65a..773e672 100644
--- a/dirsrvtests/tests/suites/plugins/accpol_test.py
+++ b/dirsrvtests/tests/suites/plugins/accpol_test.py
@@ -119,7 +119,7 @@ def pwacc_lock(topology_st, suffix, subtree, userid, nousrs):
topology_st.standalone.simple_bind_s(userdn, USER_PASW)
log.error('User {} is not locked, expected error 19'.format(userdn))
nousrs = nousrs - 1
- time.sleep(1)
+ time.sleep(1)
def userpw_reset(topology_st, suffix, subtree, userid, nousrs, bindusr, bindpw,
newpasw):
@@ -144,7 +144,7 @@ def userpw_reset(topology_st, suffix, subtree, userid, nousrs,
bindusr, bindpw,
log.error('Unable to reset userPassword for
user-{}'.format(userdn))
raise e
nousrs = nousrs - 1
- time.sleep(1)
+ time.sleep(1)
def nsact_inact(topology_st, suffix, subtree, userid, nousrs, command, expected):
@@ -171,7 +171,7 @@ def nsact_inact(topology_st, suffix, subtree, userid, nousrs, command,
expected)
log.info('output: {}'.format(output))
assert expected in output
nousrs = nousrs - 1
- time.sleep(1)
+ time.sleep(1)
def modify_attr(topology_st, base_dn, attr_name, attr_val):
@@ -218,6 +218,7 @@ def add_time_attr(topology_st, suffix, subtree, userid, nousrs,
attr_name):
log.error('Failed to add/replace {} attribute to-{}, for
user-{}'.format(attr_name, new_attr_val, userdn))
raise e
nousrs = nousrs - 1
+ time.sleep(1)
time.sleep(1)
@@ -235,7 +236,7 @@ def modusr_attr(topology_st, suffix, subtree, userid, nousrs,
attr_name, attr_va
log.error('Failed to add/replace {} attribute to-{}, for
user-{}'.format(attr_name, attr_value, userdn))
raise e
nousrs = nousrs - 1
- time.sleep(1)
+ time.sleep(1)
def del_time_attr(topology_st, suffix, subtree, userid, nousrs, attr_name):
@@ -252,7 +253,7 @@ def del_time_attr(topology_st, suffix, subtree, userid, nousrs,
attr_name):
log.error('Failed to delete {} attribute for
user-{}'.format(attr_name, userdn))
raise e
nousrs = nousrs - 1
- time.sleep(1)
+ time.sleep(1)
def add_users(topology_st, suffix, subtree, userid, nousrs, ulimit):
@@ -308,6 +309,7 @@ def account_status(topology_st, suffix, subtree, userid, nousrs,
ulimit, tochck)
topology_st.standalone.simple_bind_s(userdn, USER_PASW)
log.error('User {} is not inactivated, expected error
19'.format(userdn))
nousrs = nousrs - 1
+ time.sleep(1)
def test_glact_inact(topology_st, accpol_global):
diff --git a/dirsrvtests/tests/tickets/ticket47653MMR_test.py
b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
index f7109d8..fa6f69a 100644
--- a/dirsrvtests/tests/tickets/ticket47653MMR_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
@@ -176,6 +176,7 @@ def test_ticket47653_add(topology_m2):
except Exception as e:
topology_m2.ms["master1"].log.info("Exception (expected): %s"
% type(e).__name__)
assert isinstance(e, ldap.INSUFFICIENT_ACCESS)
+ time.sleep(1)
# entry to add WITH memberS and WITH the ACI -> ldap.INSUFFICIENT_ACCESS
# member should contain only one value
@@ -185,6 +186,7 @@ def test_ticket47653_add(topology_m2):
except Exception as e:
topology_m2.ms["master1"].log.info("Exception (expected): %s"
% type(e).__name__)
assert isinstance(e, ldap.INSUFFICIENT_ACCESS)
+ time.sleep(2)
topology_m2.ms["master1"].log.info("Try to add Add %s should be
successful" % ENTRY_DN)
try:
@@ -212,6 +214,7 @@ def test_ticket47653_add(topology_m2):
topology_m2.ms["master1"].log.info("Update %s on M2" %
ENTRY_DN)
mod = [(ldap.MOD_REPLACE, 'description', 'test_add')]
topology_m2.ms["master2"].modify_s(ENTRY_DN, mod)
+ time.sleep(1)
topology_m2.ms["master1"].simple_bind_s(DN_DM, PASSWORD)
loop = 0
@@ -264,7 +267,7 @@ def test_ticket47653_modify(topology_m2):
ACI_BODY = ACI_TARGET + ACI_TARGETATTR + ACI_TARGETFILTER + ACI_ALLOW + ACI_SUBJECT
mod = [(ldap.MOD_ADD, 'aci', ACI_BODY)]
topology_m2.ms["master1"].modify_s(SUFFIX, mod)
- time.sleep(1)
+ time.sleep(2)
# bind as bind_entry
topology_m2.ms["master1"].log.info("M1: Bind as %s" % BIND_DN)
diff --git a/dirsrvtests/tests/tickets/ticket48194_test.py
b/dirsrvtests/tests/tickets/ticket48194_test.py
index 4ca94f9..6879eec 100644
--- a/dirsrvtests/tests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tests/tickets/ticket48194_test.py
@@ -127,7 +127,7 @@ def test_run_0(topology_st):
log.info("\n######################### Restarting the server
######################\n")
topology_st.standalone.restart(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', True)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', True)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
@@ -151,7 +151,7 @@ def test_run_1(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
@@ -175,7 +175,7 @@ def test_run_2(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', False)
connectWithOpenssl(topology_st, 'AES128-SHA', True)
connectWithOpenssl(topology_st, 'AES256-SHA', True)
@@ -199,7 +199,7 @@ def test_run_3(topology_st):
time.sleep(1)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', False)
@@ -221,7 +221,7 @@ def test_run_4(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
@@ -243,7 +243,7 @@ def test_run_5(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
@@ -267,34 +267,11 @@ def test_run_6(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', False)
connectWithOpenssl(topology_st, 'AES128-SHA', True)
-def test_run_7(topology_st):
- """
- Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
- All ciphers are disabled.
- default allowWeakCipher
- """
- _header(topology_st, 'Test Case 8 - Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
with default allowWeakCipher')
-
- topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE,
'nsSSL3Ciphers', '-all,+rsa_rc4_128_md5')])
-
- log.info("\n######################### Restarting the server
######################\n")
- topology_st.standalone.stop(timeout=10)
- os.system('mv %s %s.48194_6' % (topology_st.standalone.errlog,
topology_st.standalone.errlog))
- os.system('touch %s' % (topology_st.standalone.errlog))
- time.sleep(2)
- topology_st.standalone.start(timeout=120)
-
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
- connectWithOpenssl(topology_st, 'AES256-SHA256', False)
- connectWithOpenssl(topology_st, 'RC4-MD5', True)
-
-
def test_run_8(topology_st):
"""
Check nsSSL3Ciphers: default + allowWeakCipher: off
@@ -313,7 +290,7 @@ def test_run_8(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
@@ -339,42 +316,10 @@ def test_run_9(topology_st):
time.sleep(2)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', True)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', True)
connectWithOpenssl(topology_st, 'AES256-SHA256', True)
-def test_run_10(topology_st):
- """
- Check nsSSL3Ciphers: -TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,
- +TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
- +TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,
- +TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,
- +TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,
- -SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,
- -SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,
- -SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5
- allowWeakCipher: on
- nsslapd-errorlog-level: 0
- """
- _header(topology_st,
- 'Test Case 11 - Check nsSSL3Ciphers: long list using the NSS Cipher Suite
name with allowWeakCipher on')
-
- topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE,
'nsSSL3Ciphers',
-
'-TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,+TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,+TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,-SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,-SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40
[...]
-
- log.info("\n######################### Restarting the server
######################\n")
- topology_st.standalone.stop(timeout=10)
- os.system('mv %s %s.48194_9' % (topology_st.standalone.errlog,
topology_st.standalone.errlog))
- os.system('touch %s' % (topology_st.standalone.errlog))
- time.sleep(1)
- topology_st.standalone.start(timeout=120)
-
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
- connectWithOpenssl(topology_st, 'RC4-MD5', True)
- connectWithOpenssl(topology_st, 'AES256-SHA256', False)
-
-
def test_run_11(topology_st):
"""
Check nsSSL3Ciphers: +fortezza
@@ -392,7 +337,7 @@ def test_run_11(topology_st):
time.sleep(1)
topology_st.standalone.start(timeout=120)
- connectWithOpenssl(topology_st, 'RC4-SHA', False)
+ connectWithOpenssl(topology_st, 'DES-CBC3-SHA', False)
connectWithOpenssl(topology_st, 'AES256-SHA256', False)
diff --git a/dirsrvtests/tests/tickets/ticket48212_test.py
b/dirsrvtests/tests/tickets/ticket48212_test.py
index 18b5f69..780e907 100644
--- a/dirsrvtests/tests/tickets/ticket48212_test.py
+++ b/dirsrvtests/tests/tickets/ticket48212_test.py
@@ -41,17 +41,12 @@ def runDbVerify(topology_st):
def reindexUidNumber(topology_st):
topology_st.standalone.log.info("\n\n +++++ reindex uidnumber +++++\n")
- sbin_dir = get_sbin_dir(prefix=topology_st.standalone.prefix)
- indexCMD = sbin_dir + "/db2index.pl -Z " + topology_st.standalone.serverid
+ " -D \"" + DN_DM + "\" -w \"" + PASSWORD +
"\" -n " + MYSUFFIXBE + " -t uidnumber"
-
- indexOUT = os.popen(indexCMD, "r")
- topology_st.standalone.log.info("Running %s" % indexCMD)
-
- time.sleep(30)
-
- tailCMD = "tail -n 3 " + topology_st.standalone.errlog
- tailOUT = os.popen(tailCMD, "r")
- assert 'Finished indexing' in tailOUT.read()
+ try:
+ args = {TASK_WAIT: True}
+ topology_st.standalone.tasks.reindex(suffix=MYSUFFIX,
attrname='uidNumber', args=args)
+ except:
+ topology_st.standalone.log.fatal("Reindexing failed")
+ assert False
def test_ticket48212(topology_st):
diff --git a/dirsrvtests/tests/tickets/ticket48944_test.py
b/dirsrvtests/tests/tickets/ticket48944_test.py
index 417508c..159df48 100644
--- a/dirsrvtests/tests/tickets/ticket48944_test.py
+++ b/dirsrvtests/tests/tickets/ticket48944_test.py
@@ -37,6 +37,7 @@ def _last_login_time(topo, userdn, inst_name, last_login):
topo.cs[inst_name].simple_bind_s(DN_DM, PASSWORD)
entry = topo.cs[inst_name].search_s(userdn, ldap.SCOPE_BASE,
'objectClass=*', ['lastLoginTime'])
lastLogin = entry[0].lastLoginTime
+ time.sleep(1)
return lastLogin
@@ -57,7 +58,7 @@ def _enable_plugin(topo, inst_name):
topo.ms[inst_name].modify_s(ACCP_CONF, [(ldap.MOD_REPLACE,
'limitattrname', 'accountInactivityLimit')])
topo.ms[inst_name].modify_s(ACCP_CONF, [(ldap.MOD_REPLACE,
'accountInactivityLimit', '3600')])
except ldap.LDAPError as e:
- log.error('Failed to configure {} plugin for
inst-{}'.format(PLUGIN_ACCT_POLICY, inst_name))
+ log.error('Failed to configure {} plugin for inst-{} error:
{}'.format(PLUGIN_ACCT_POLICY, inst_name, str(e)))
topo.ms[inst_name].restart(timeout=10)
else:
log.info('Configure Account policy plugin on {}'.format(inst_name))
@@ -72,7 +73,7 @@ def _enable_plugin(topo, inst_name):
topo.cs[inst_name].modify_s(ACCP_CONF, [(ldap.MOD_REPLACE,
'limitattrname', 'accountInactivityLimit')])
topo.cs[inst_name].modify_s(ACCP_CONF, [(ldap.MOD_REPLACE,
'accountInactivityLimit', '3600')])
except ldap.LDAPError as e:
- log.error('Failed to configure {} plugin for
inst-{}'.format(PLUGIN_ACCT_POLICY, inst_name))
+ log.error('Failed to configure {} plugin for inst-{} error
{}'.format(PLUGIN_ACCT_POLICY, inst_name, str(e)))
topo.cs[inst_name].restart(timeout=10)
@@ -157,7 +158,7 @@ def test_ticket48944(topo):
topo.cs['consumer1'].start(timeout=10)
topo.cs['consumer2'].start(timeout=10)
topo.ms['master2'].start(timeout=10)
- time.sleep(5)
+ time.sleep(10)
log.info('Check if consumers are updated with lastLoginTime attribute value from
master2')
lastLogin_c1_1 = _last_login_time(topo, tuserdn, 'consumer1',
'check')
assert lastLogin_c1_1 == lastLogin_m2_1
@@ -172,7 +173,7 @@ def test_ticket48944(topo):
lastLogin_c2_2 = _last_login_time(topo, tuserdn, 'consumer2',
'bind_n_check')
assert lastLogin_c2_2 > lastLogin_m2_1
- time.sleep(2)
+ time.sleep(5)
lastLogin_m2_2 = _last_login_time(topo, tuserdn, 'master2', 'check')
assert lastLogin_m2_2 == lastLogin_m2_1
diff --git a/dirsrvtests/tests/tickets/ticket48956_test.py
b/dirsrvtests/tests/tickets/ticket48956_test.py
index 8715d9e..c028c39 100644
--- a/dirsrvtests/tests/tickets/ticket48956_test.py
+++ b/dirsrvtests/tests/tickets/ticket48956_test.py
@@ -30,7 +30,9 @@ def _check_status(topology_st, user, expected):
nsaccountstatus = os.path.join(topology_st.standalone.ds_paths.sbin_dir,
"ns-accountstatus.pl")
try:
- output = subprocess.check_output( [nsaccountstatus, '-Z',
topology_st.standalone.serverid, '-D', DN_DM, '-w', PASSWORD,
'-p', str(topology_st.standalone.port), '-I', user])
+ output = subprocess.check_output([nsaccountstatus, '-Z',
topology_st.standalone.serverid,
+ '-D', DN_DM, '-w', PASSWORD,
+ '-p', str(topology_st.standalone.port),
'-I', user])
except subprocess.CalledProcessError as err:
output = err.output
@@ -47,6 +49,8 @@ def _check_inactivity(topology_st, mysuffix):
topology_st.standalone.add_s(
Entry((ACCT_POLICY_DN, {'objectclass': "top ldapsubentry
extensibleObject accountpolicy".split(),
'accountInactivityLimit': INACTIVITY_LIMIT})))
+ time.sleep(1)
+
TEST_USER_DN = 'uid=%s,%s' % (TEST_USER, mysuffix)
log.info("\n######################### Adding Test User entry: %s
######################\n" % TEST_USER_DN)
topology_st.standalone.add_s(
@@ -56,6 +60,7 @@ def _check_inactivity(topology_st, mysuffix):
'givenname': TEST_USER,
'userPassword': TEST_USER_PW,
'acctPolicySubentry': ACCT_POLICY_DN})))
+ time.sleep(1)
# Setting the lastLoginTime
try:
@@ -90,7 +95,6 @@ def test_ticket48956(topology_st):
# Enable the plugins
topology_st.standalone.plugins.enable(name=PLUGIN_ACCT_POLICY)
-
topology_st.standalone.restart(timeout=10)
# Check inactivity on standard suffix (short)
diff --git a/dirsrvtests/tests/tickets/ticket49039_test.py
b/dirsrvtests/tests/tickets/ticket49039_test.py
index 882332d..f6b768c 100644
--- a/dirsrvtests/tests/tickets/ticket49039_test.py
+++ b/dirsrvtests/tests/tickets/ticket49039_test.py
@@ -133,8 +133,8 @@ def test_ticket49039(topo):
time.sleep(1)
# Run ldappasswd as the User.
- cmd = ('LDAPTLS_REQCERT=never LDAPTLS_CACERTDIR=' +
topo.standalone.get_cert_dir() +
- ' ldappasswd' + ' -h ' + topo.standalone.host + ' -Z -p
38901 -D ' + USER_DN +
+ os.environ["LDAPTLS_CACERTDIR"] = topo.standalone.get_cert_dir()
+ cmd = ('ldappasswd' + ' -h ' + topo.standalone.host + ' -Z -p
38901 -D ' + USER_DN +
' -w password -a password -s password2 ' + USER_DN)
os.system(cmd)
time.sleep(1)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.