Skip to content

Commit

Permalink
implements fail fast when sending request fail #13
Browse files Browse the repository at this point in the history
Signed-off-by: olivier lamy <[email protected]>
  • Loading branch information
olamy committed Apr 1, 2017
1 parent d1ada8e commit cca7412
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public void failed(Throwable x) {
logger.debug("failed tree for {}", resource);
}
callback.failed(x);
LoadGenerator.this.interrupt();
}
}, nodes);
Sender sender = new Sender(client, warmup, treeCallback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ protected void service( HttpServletRequest request, HttpServletResponse response
{
throw new RuntimeException( e.getMessage(), e );
}

}
response.getOutputStream().write( "Jetty rocks!!".getBytes() );
response.flushBuffer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public void run()
.warmupIterationsPerThread( starterArgs.getWarmupNumber() ) //
.scheme( starterArgs.getScheme() ); //

if (starterArgs.getThreads() > 0)
{
loadGeneratorBuilder.threads( starterArgs.getThreads() );
}

if ( starterArgs.getMaxRequestsQueued() > 0 )
{
loadGeneratorBuilder.maxRequestsQueued( starterArgs.getMaxRequestsQueued() );
Expand Down

0 comments on commit cca7412

Please sign in to comment.