Skip to content
Permalink
Browse files
FC-287 - Fortress Ant load improvements
  • Loading branch information
shawnmckinney committed Nov 11, 2020
1 parent 2fb8991 commit d9ddc8ccc83fdde5a4f16ef137a8644d27cf2852
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
@@ -53,6 +53,7 @@ Role-Based Access Control (RBAC)
* SECTION 12. Instructions to run the Apache Fortress Command Console.
* SECTION 13. Instructions to build and test the Apache Fortress samples.
* SECTION 14. Instructions to performance test.
* SECTION 15. Howto Debug a load script.
___________________________________________________________________________________
## Document Overview

@@ -828,4 +829,24 @@ ________________________________________________________________________________
mvn -Ploadtest-accel-createsess jmeter:jmeter
```
___________________________________________________________________________________
## SECTION 14. Howto Debug a load script

1. Add -Ddebug to runtime args

```
mvn install -Dload.file=./ldap/setup/refreshLDAPData.xml -Ddebug=5432
```

Which suspends the started process waiting for connection on port specified with -Ddebug flag.

```
fortress-load-debug:
[echo] ############### Run Fortress Ant script to load policy ###############
[startAnt] Listening for transport dt_socket at address: 5432
```

2. Set breakpoints in [FortressAntTask](src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java)

3. Connect with the JDB on the specified port.

#### END OF README
@@ -716,7 +716,7 @@
<id>fortress-load</id>
<phase>test</phase>
<configuration>
<target name="fortress-load" if="load.file" description="Loads fortress policy into ldap">
<target name="fortress-load" if="load.file" unless="debug" description="Loads fortress policy into ldap">
<echo message="############### Run Fortress Ant script to load policy ###############" />
<java classname="org.apache.tools.ant.launch.Launcher" fork="true" clonevm="true" failonerror="true" dir="${basedir}" timeout="600000" taskname="startAnt">
<!-- add config/bootstrap folder first because the config ldap node might not be inserted yet: -->
@@ -739,12 +739,13 @@
<phase>test</phase>
<configuration>
<target name="fortress-load-debug" if="debug" description="Loads fortress policy into ldap">
<echo message="############### Run Fortress Ant script to load policy ###############" />
<echo message="############### Run Fortress Ant script to load policy in debug mode ###############" />
<java classname="org.apache.tools.ant.launch.Launcher" fork="true" clonevm="true" failonerror="true" dir="${basedir}" timeout="600000" taskname="startAnt">
<classpath location="./config/bootstrap/"/>
<classpath refid="maven.test.classpath"/>
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debug}" />
<!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" />-->
<sysproperty key="version" value="${project.version}" />
<sysproperty key="tenant" value="${tenant}" />
<arg value="-buildfile" />

0 comments on commit d9ddc8c

Please sign in to comment.