Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ package-lock.json
/atlassian-ide-plugin.xml
src/main/generated/

ngrinder-controller/bin/
ngrinder-core/bin/
ngrinder-groovy/bin/
Original file line number Diff line number Diff line change
Expand Up @@ -205,31 +205,41 @@ protected boolean hasEnoughFreeAgents(PerfTest test) {
* @param perfTest perftest instance;
*/
public void doTest(final PerfTest perfTest) {
SingleConsole singleConsole = null;
try {
GrinderProperties grinderProperties = perfTestService.prepareTest(perfTest);
singleConsole = startConsole(perfTest);
startAgentsOn(perfTest, grinderProperties, checkCancellation(singleConsole));
distributeFileOn(perfTest, checkCancellation(singleConsole));
singleConsole.setReportPath(perfTestService.getReportFileDirectory(perfTest));
runTestOn(perfTest, grinderProperties, checkCancellation(singleConsole));
} catch (PerfTestPrepareException ex) {
LOG.error(format(perfTest, "Error while preparing a test : {} ", ex.getMessage()));
perfTestService.markProgressAndStatusAndFinishTimeAndStatistics(perfTest, Status.STOP_BY_ERROR,
ex.getMessage());
} catch (SingleConsoleCancellationException ex) {
// In case of error, mark the occurs error on perftest.
LOG.error(format(perfTest, "Error while preparing a single console : {} ", ex.getMessage()));
doCancel(perfTest, requireNonNull(singleConsole));
notifyFinish(perfTest, StopReason.CANCEL_BY_USER);
} catch (Exception ex) {
// In case of error, mark the occurs error on perftest.
LOG.error(format(perfTest, "Error while executing a test: {}", ex.getMessage()));
LOG.debug("Stack Trace is : ", ex);
doTerminate(perfTest, singleConsole, ex.getMessage());
notifyFinish(perfTest, StopReason.ERROR_WHILE_PREPARE);
}
}
SingleConsole singleConsole = null;
try {
LOG.info("Starting test preparation for PerfTest: {}", perfTest.getId());

GrinderProperties grinderProperties = perfTestService.prepareTest(perfTest);
LOG.info("Test preparation completed for PerfTest: {}", perfTest.getId());

singleConsole = startConsole(perfTest);
LOG.info("Console started for PerfTest: {}", perfTest.getId());

startAgentsOn(perfTest, grinderProperties, checkCancellation(singleConsole));
LOG.info("Agents started for PerfTest: {}", perfTest.getId());

distributeFileOn(perfTest, checkCancellation(singleConsole));
LOG.info("Files distributed for PerfTest: {}", perfTest.getId());

singleConsole.setReportPath(perfTestService.getReportFileDirectory(perfTest));
LOG.info("Report path set for PerfTest: {}", perfTest.getId());

runTestOn(perfTest, grinderProperties, checkCancellation(singleConsole));
LOG.info("Test run started for PerfTest: {}", perfTest.getId());
} catch (PerfTestPrepareException ex) {
LOG.error(format(perfTest, "Error while preparing a test : {} ", ex.getMessage()), ex);
perfTestService.markProgressAndStatusAndFinishTimeAndStatistics(perfTest, Status.STOP_BY_ERROR,
ex.getMessage());
} catch (SingleConsoleCancellationException ex) {
LOG.error(format(perfTest, "Error while preparing a single console : {} ", ex.getMessage()), ex);
doCancel(perfTest, requireNonNull(singleConsole));
notifyFinish(perfTest, StopReason.CANCEL_BY_USER);
} catch (Exception ex) {
LOG.error(format(perfTest, "Error while executing a test: {}", ex.getMessage()), ex);
doTerminate(perfTest, singleConsole, ex.getMessage());
notifyFinish(perfTest, StopReason.ERROR_WHILE_PREPARE);
}
}

/**
* Delete cached distribution files, These are already in the agent cache directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private String normalizeUserSearchFilter(String userFilter, String userId) {
if (!userFilter.startsWith("(") || !userFilter.endsWith(")")) {
userFilter = "(" + userFilter + ")";
}
String userIdFilter = String.format("(CN=%s)", userId);
String userIdFilter = String.format("(sAMAccountName=%s)", userId);

if (isBlank(userFilter) && isBlank(userId)) {
return EMPTY;
Expand Down
2 changes: 1 addition & 1 deletion ngrinder-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
exclude (module: "asm")
}
api (group: "org.json", name: "json", version:"20090211")
api (group: "dnsjava", name: "dnsjava", version:"3.2.2")
api (group: "dnsjava", name: "dnsjava", version:"3.3.1")
api (group: "org.hamcrest", name: "hamcrest-all", version:"1.1")
api (group: "org.ow2.asm", name: "asm", version: "9.0")
api (group: "org.apache.httpcomponents.core5", name: "httpcore5-h2", version: "5.0.3")
Expand Down