Skip to content

Commit

Permalink
Add option to keep ICA files (useful for debugging issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmouawad committed Jan 27, 2020
1 parent b32b87e commit 4536f85
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class StartApplicationSampler extends CitrixBaseSampler
20000); // $NON-NLS-1$

private static final boolean FORCE_NORMAL_MODE = JMeterUtils.getPropDefault(CitrixUtils.PROPERTIES_PFX + "force_normal_output", false); // $NON-NLS-1$
private static final boolean KEEP_ICA_FILES = JMeterUtils.getPropDefault(CitrixUtils.PROPERTIES_PFX + "keep_ica_files", false); // $NON-NLS-1$

private static final String LOGON_TIMEOUT_PROP = "StartApplicationSampler.logonTimeout";
private static final String FILE_PATH_VAR_PROP = "StartApplicationSampler.filePathVar";
Expand Down Expand Up @@ -166,8 +167,8 @@ protected void doClientAction(CitrixClient client)
throw new SamplerRunException(CitrixUtils.getResString("start_application_sampler_not_connected", false));
}
} finally {
if (icaFilePath != null && !Paths.get(icaFilePath).toFile().delete()) {
LOGGER.warn("Cannot delete ica file {}", icaFilePath);
if (!KEEP_ICA_FILES && icaFilePath != null && !Paths.get(icaFilePath).toFile().delete()) {
LOGGER.warn("Cannot delete ica file {}", icaFilePath);
}
}
}
Expand Down

0 comments on commit 4536f85

Please sign in to comment.