diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/remove-elytron-subsystem.cli b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/remove-elytron-subsystem.cli
new file mode 100644
index 0000000000..58eefde988
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/remove-elytron-subsystem.cli
@@ -0,0 +1,5 @@
+if (result == success) of /subsystem=elytron/:read-resource
+ echo Removing Elytron subsystem
+ /subsystem=elytron/:remove
+ echo
+end-if
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh
index d170a1ea7d..4a749faadb 100755
--- a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh
@@ -25,9 +25,10 @@ do
./jboss-cli.sh -c --file="adapter-install.cli"
if [ "$ELYTRON_SUPPORTED" = true ]; then
+ echo "Installing elytron adapter."
./jboss-cli.sh -c --file="adapter-elytron-install.cli"
else
- ./jboss-cli.sh -c --command="/subsystem=elytron:remove"
+ ./jboss-cli.sh -c --file="$CLI_PATH/remove-elytron-subsystem.cli"
fi
if [ $? -ne 0 ]; then RESULT=1; fi
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
index d92bd20a5e..3f43c46d80 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
@@ -226,6 +226,7 @@
${app.server.jboss.home}
${app.server.saml.adapter.supported}
${app.server.elytron.adapter.supported}
+ ${common.resources}/cli