Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Commit

Permalink
CSAFE-5532: Remove concurrent requests from stopping conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nlahmedIBM committed Oct 13, 2016
1 parent 2c37d34 commit f641f98
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
27 changes: 27 additions & 0 deletions og-assembly/src/main/asciidoc/userguide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,33 @@ authentication if absent.
|No
|"seconds"

|status_codes
|Object
|No
|{}
|===



==== Failing Conditions Configuration
|===
|Parameter|Type|Required|Default

|operations
|Integer
|No
|None

|runtime
|Decimal
|No
|None

|runtime_unit
|Enum (see <<Time Units>>)
|No
|"seconds"

|concurrent_requests
|Integer
|No
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ public List<TestCondition> provideTestConditions(final LoadTest test, final Even
checkArgument(stoppingConditionsConfig.operations >= 0, "operations must be >= 0 [%s]", stoppingConditionsConfig.operations);
checkArgument(stoppingConditionsConfig.runtime >= 0.0, "runtime must be >= 0.0 [%s]", stoppingConditionsConfig.runtime);
checkNotNull(stoppingConditionsConfig.runtimeUnit);
checkArgument(stoppingConditionsConfig.concurrentRequests >= 0, "concurrentRequests must be >= 0 [%s]",
stoppingConditionsConfig.concurrentRequests);
checkNotNull(stoppingConditionsConfig.statusCodes);
for (final Entry<Integer, Integer> sc : stoppingConditionsConfig.statusCodes.entrySet()) {
checkArgument(sc.getValue() >= 0.0, "status code [%s] value must be >= 0.0 [%s]", sc.getKey(),
Expand Down Expand Up @@ -269,12 +267,6 @@ public List<TestCondition> provideTestConditions(final LoadTest test, final Even
conditions.add(new RuntimeCondition(test, stoppingConditionsConfig.runtime, stoppingConditionsConfig.runtimeUnit, false));
}

// maximum concurrent requests only makes sense in the context of an ops test, so check for that
if (stoppingConditionsConfig.concurrentRequests > 0 && concurrency.type == ConcurrencyType.OPS) {
conditions.add(
new ConcurrentRequestCondition(Operation.ALL, stoppingConditionsConfig.concurrentRequests, test, stats, false));
}

// Failing conditions
if (failingConditionsConfig.operations > 0) {
conditions.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ public class StoppingConditionsConfig {
public long operations;
public double runtime;
public TimeUnit runtimeUnit;
public long concurrentRequests;
public Map<Integer, Integer> statusCodes;

public StoppingConditionsConfig() {
this.operations = 0;
this.runtime = 0.0;
this.runtimeUnit = TimeUnit.SECONDS;
this.concurrentRequests = 2000;
this.statusCodes = Maps.newHashMap();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public void invalidStoppingConditions(final long operations, final double runtim
stoppingConditions.operations = operations;
stoppingConditions.runtime = runtime;
stoppingConditions.runtimeUnit = runtimeUnit;
stoppingConditions.concurrentRequests = concurrentRequests;
stoppingConditions.statusCodes = statusCodes;

final FailingConditionsConfig failingConditions = new FailingConditionsConfig();
Expand Down

0 comments on commit f641f98

Please sign in to comment.