Permalink
Browse files

Test Scenario will success only if number of successes is greater tha…

…n number of failures.
  • Loading branch information...
1 parent a1d2069 commit 18cfce8f7713003e2db13958ed25da7095b9c8ca @kpyatkivskyy kpyatkivskyy committed Nov 12, 2012
View
5 src/EventStore/EventStore.TestClient/Commands/WriteFloodHttpProcessor.cs
@@ -176,7 +176,10 @@ private void WriteFlood(CommandProcessorContext context, string eventStreamId, i
string.Format("{0}-{1}-{2}-failureSuccessRate", Keyword, clientsCnt, requestsCnt),
100*fail/(fail + succ));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason:"Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}
View
5 src/EventStore/EventStore.TestClient/Commands/WriteFloodProcessor.cs
@@ -230,7 +230,10 @@ private void WriteFlood(CommandProcessorContext context, int clientsCnt, long re
string.Format("{0}-{1}-{2}-failureSuccessRate", Keyword, clientsCnt, requestsCnt),
100*fail/(fail + succ));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason: "Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}
View
5 src/EventStore/EventStore.TestClient/Commands/WriteFloodWaitingHttpProcessor.cs
@@ -176,7 +176,10 @@ private void WriteFlood(CommandProcessorContext context, int clientsCnt, int req
PerfUtils.LogTeamCityGraphData(string.Format("{0}-latency-ms", Keyword),
(int)(sw.ElapsedMilliseconds / requestsCnt));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason: "Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}
View
5 src/EventStore/EventStore.TestClient/Commands/WriteFloodWaitingProcessor.cs
@@ -180,7 +180,10 @@ private void WriteFlood(CommandProcessorContext context, int clientsCnt, int req
PerfUtils.LogTeamCityGraphData(string.Format("{0}-latency-ms", Keyword),
(int) (sw.ElapsedMilliseconds/requestsCnt));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason: "Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}
View
5 src/EventStore/EventStore.TestClient/Commands/WriteLongTermHttpProcessor.cs
@@ -253,7 +253,10 @@ public bool Execute(CommandProcessorContext context, string[] args)
string.Format("{0}-{1}-{2}-failureSuccessRate", Keyword, clientsCnt, requestsCnt),
100 * fail / (fail + succ));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason: "Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}
View
5 src/EventStore/EventStore.TestClient/Commands/WriteLongTermProcessor.cs
@@ -250,7 +250,10 @@ public bool Execute(CommandProcessorContext context, string[] args)
string.Format("{0}-{1}-{2}-failureSuccessRate", Keyword, clientsCnt, requestsCnt),
100*fail/(fail + succ));
- context.Success();
+ if (succ < fail)
+ context.Fail(reason: "Number of failures is greater than number of successes");
+ else
+ context.Success();
}
}
}

0 comments on commit 18cfce8

Please sign in to comment.