Add capability for debugging tests
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2007-2010 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2011-2012 ForgeRock AS. |
| | | ! Portions Copyright 2011-2013 ForgeRock AS. |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | |
| | | <!-- Start the server again --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : serverPath |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : serverPath, |
| | | 'dsDebugPort' : server.getDebugPort() |
| | | } |
| | | </call> |
| | | <if expr="globalSplitServers"> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : replServer.getHostname(), |
| | | 'dsPath' : replServerPath |
| | | 'dsPath' : replServerPath, |
| | | 'dsDebugPort' : replServer.getDebugPort() |
| | | } |
| | | </call> |
| | | </if> |
| | |
| | | |
| | | <!-- Start the server again --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : serverPath |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : serverPath, |
| | | 'dsDebugPort' : server.getDebugPort() |
| | | } |
| | | </call> |
| | | <if expr="globalSplitServers"> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : replServer.getHostname(), |
| | | 'dsPath' : replServerPath |
| | | 'dsPath' : replServerPath, |
| | | 'dsDebugPort' : replServer.getDebugPort() |
| | | } |
| | | </call> |
| | | </if> |
| | |
| | | suiteList.append('encryption') |
| | | suiteList.append('changelog') |
| | | suiteList.append('conflict') |
| | | suiteList.append('aci') |
| | | suiteList.append('externalchangelog') |
| | | suiteList.append('externalchangelog_consistency') |
| | | suiteList.append('aci') |
| | | |
| | | globalAssuredReplication = None |
| | | |
| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2007-2010 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2012 ForgeRock AS. |
| | | ! Portions Copyright 2012-2013 ForgeRock AS. |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | |
| | | <!-- Start the Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsDebugPort' : master.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | sdk.dir= |
| | | temp.dir=/tmp |
| | | test.plan.custom= |
| | | test.plan.functional.default=aci,backends,clu,clu_secure,core,dsconfig,dsml,fractional-replication,groups,i18n,indexes,logging,monitoring,password_policy,plugins,privileges,pta,replication,schema,security,setup,snmp,tasks,virtualAttributes,replication-safe-data,replication-safe-read |
| | | test.plan.functional.default=aci,backends,clu,clu_secure,connection_handlers,core,dsconfig,dsml,fractional-replication,groups,i18n,indexes,logging,monitoring,password_policy,plugins,privileges,pta,replication,schema,security,setup,snmp,tasks,virtualAttributes,replication-safe-data,replication-safe-read |
| | | test.plan.stress.default=import_ldif,operations,replication |
| | | verbose.mode=false |
| | | debug.port= |
| | | |
| | | product.name=OpenDJ |
| | | logs.uri=file:// |
| | |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="option"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsDebugPort" type="optional" default="DEBUG_PORT"> |
| | | <function-arg-description> |
| | | Directory Server debug port |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="expectedRC" type="optional" default="0"> |
| | | <function-arg-description> |
| | | Expected return code value. Default value is 0. |
| | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <message>'DEBUG PORT: %s' % dsDebugPort</message> |
| | | |
| | | <script> |
| | | if dsDebugPort != '' and STAFCmdParams == '': |
| | | envCmd = [ 'OPENDJ_JAVA_ARGS=-agentlib:jdwp=transport=dt_socket,address=%s,server=y,suspend=y' % dsDebugPort ] |
| | | else: |
| | | envCmd = [] |
| | | </script> |
| | | |
| | | <call function="'runCommand'"> |
| | | { 'location' : location, |
| | |
| | | 'arguments' : STAFCmdParams, |
| | | 'location' : location, |
| | | 'expectedRC': expectedRC, |
| | | 'knownIssue': knownIssue |
| | | 'knownIssue': knownIssue, |
| | | 'envCmd' : envCmd |
| | | } |
| | | </call> |
| | | <return>STAXResult</return> |
| | |
| | | |
| | | <!--- Start DS --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME) |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME), |
| | | 'dsDebugPort' : server.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | |
| | | <!--- Start DS --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME) |
| | | { 'location' : server.getHostname(), |
| | | 'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME), |
| | | 'dsDebugPort' : server.getDebugPort() |
| | | } |
| | | </call> |
| | | |
| | |
| | | rootPwd = None |
| | | baseDn = None |
| | | changelogport = None |
| | | debugPort = None |
| | | suffixList = [] |
| | | changelogList = [] |
| | | serverId = 1 |
| | |
| | | baseDn = line[line.find('BaseDn') + 7:].strip() |
| | | elif line.find('Changelogport') != -1: |
| | | changelogport = line[line.find('Changelogport') + 14:].strip() |
| | | elif line.find('Debugport') != -1: |
| | | debugPort = line[line.find('Debugport') + 10:].strip() |
| | | elif line.find('SynchronizedSuffix') != -1: |
| | | suffixList.append( line[line.find('SynchronizedSuffix') + 19:].strip() ) |
| | | elif line.find('ChangelogServer') != -1: |
| | | changelogList.append( line[line.find('ChangelogServer') + 16:].strip() ) |
| | | elif (line.isspace()) or (len(line) == 0): |
| | | server = Server(hostname, dir, port, adminport, sslport, jmxport, |
| | | rootDn, rootPwd, baseDn, remote.data) |
| | | rootDn, rootPwd, baseDn, debugPort, remote.data) |
| | | |
| | | if changelogport != None: |
| | | changelogServer = ChangelogServer(changelogport, serverId) |
| | |
| | | rootPwd = None |
| | | baseDn = None |
| | | changelogport = None |
| | | debugPort = None |
| | | suffixList = [] |
| | | changelogList = [] |
| | | serverId += 1 |
| | | |
| | | if hostname != None: |
| | | server = Server(hostname, dir, port, adminport, sslport, jmxport, |
| | | rootDn, rootPwd, baseDn, remote.data) |
| | | rootDn, rootPwd, baseDn, debugPort, remote.data) |
| | | |
| | | if changelogport != None: |
| | | changelogServer = ChangelogServer(changelogport, serverId) |
| | |
| | |
|
| | | # Define Server class
|
| | | class Server:
|
| | | def __init__(self, hostname, dir, port, adminPort, sslPort, jmxPort, rootDn, rootPwd, baseDn, datadir):
|
| | | def __init__(self, hostname, dir, port, adminPort, sslPort, jmxPort, rootDn, rootPwd, baseDn, debugPort, datadir):
|
| | | self.hostname = hostname
|
| | | self.dir = dir
|
| | | self.temp = '%s/temp' % dir
|
| | |
| | | self.rootPwd = rootPwd
|
| | | self.baseDn = baseDn
|
| | | self.changelogServer = None
|
| | | self.debugPort = debugPort
|
| | | self.synchronizedSuffixList = []
|
| | |
|
| | | def __repr__(self):
|
| | |
| | | def getChangelogServer(self):
|
| | | return self.changelogServer
|
| | |
|
| | | def getDebugPort(self):
|
| | | return self.debugPort
|
| | |
|
| | | def getSynchronizedSuffixList(self):
|
| | | return self.synchronizedSuffixList
|
| | |
|
| | |
| | | new_rootDn = self.rootDn
|
| | | new_rootPwd = self.rootPwd
|
| | | new_baseDn = self.baseDn
|
| | | new_changelogServer = self.changelogServer |
| | | new_changelogServer = self.changelogServer
|
| | | new_debugPort = self.debugPort |
| | | self.changelogServer = None |
| | | |
| | | replServer = Server(new_hostname, new_dir, new_port, new_adminPort, new_sslPort, |
| | | new_jmxPort, new_rootDn, new_rootPwd, new_baseDn, self.data) |
| | | new_jmxPort, new_rootDn, new_rootPwd, new_baseDn, self.debugPort, self.data) |
| | | replServer.addChangelogServer(new_changelogServer) |
| | | |
| | | return replServer
|
| | |
| | | SNMP_OPENDMK_JARFILE = '${snmp.opendmk.lib.dir}/jdmkrt.jar' |
| | | SNMP_PORT = '8085' |
| | | SNMP_TRAP_PORT = '8086' |
| | | DEBUG_PORT = '${debug.port}' |
| | | LDCLT_DIR = '${ldclt.dir}' |
| | | VERBOSE_MODE = '${verbose.mode}' |
| | | TEST_PLAN_CUSTOM = '${test.plan.custom}' |
| | |
| | | # |
| | | # |
| | | # Copyright 2007-2009 Sun Microsystems, Inc. |
| | | # Portions Copyright 2013 Forgerock AS |
| | | # |
| | | Hostname: ${remote.hostname} |
| | | Directory: ${tests.tmp.dir}/opends-synchro-tests/server1 |
| | |
| | | RootPwd: secret12 |
| | | BaseDn: o=example |
| | | Changelogport: 11112 |
| | | #Debugport: 8081 |
| | | SynchronizedSuffix: o=example |
| | | ChangelogServer: ${remote.hostname}:11112 |
| | | ChangelogServer: ${remote.hostname}:22222 |
| | |
| | | RootPwd: secret12 |
| | | BaseDn: o=example |
| | | Changelogport: 22222 |
| | | #Debugport: 8082 |
| | | SynchronizedSuffix: o=example |
| | | ChangelogServer: ${remote.hostname}:11112 |
| | | ChangelogServer: ${remote.hostname}:22222 |
| | |
| | | RootPwd: secret12 |
| | | BaseDn: o=example |
| | | Changelogport: 33333 |
| | | #Debugport: 8083 |
| | | SynchronizedSuffix: o=example |
| | | ChangelogServer: ${remote.hostname}:11112 |
| | | ChangelogServer: ${remote.hostname}:22222 |
| | |
| | | # |
| | | # |
| | | # Copyright 2007-2009 Sun Microsystems, Inc. |
| | | # Portions Copyright 2013 Forgerock AS |
| | | # |
| | | Hostname: ${remote.hostname} |
| | | Directory: ${tests.tmp.dir}/opends-synchro-tests/server1 |
| | |
| | | RootPwd: secret12 |
| | | BaseDn: o=example |
| | | Changelogport: 11112 |
| | | #Debugport: 8081 |
| | | SynchronizedSuffix: o=example |
| | | ChangelogServer: ${remote.hostname}:11112 |
| | | ChangelogServer: ${remote.hostname}:22222 |
| | |
| | | RootPwd: secret12 |
| | | BaseDn: o=example |
| | | Changelogport: 22222 |
| | | #Debugport: 8082 |
| | | SynchronizedSuffix: o=example |
| | | ChangelogServer: ${remote.hostname}:11112 |
| | | ChangelogServer: ${remote.hostname}:22222 |