Add params

Change-Id: I30d8d140a0ac01db9a5fbc184616fff487852109
This commit is contained in:
Dominik Adam Przybysz 2015-12-16 20:07:47 +01:00 committed by Dominik Przybysz
parent 159f0a4987
commit 229f2d02d3

View file

@ -21,6 +21,9 @@ import java.util.concurrent.TimeUnit;
public class MockserverTest {
HttpMockServer httpMockServer;
@Param({"9000", "8000"})
int initialPort;
@Setup
public void prepareMockServer(BenchmarkParams params) {
httpMockServer = new HttpMockServer(9999);
@ -54,7 +57,7 @@ public class MockserverTest {
public void shouldHandleManyRequestsSimultaneously(TestState testState, Blackhole bh) throws IOException {
int current = testState.current;
int endpointNumber = current % 10;
int port = 9000 + (current % 7);
int port = initialPort + (current % 7);
AddMock addMock = new AddMock();
addMock.setName("testRest" + current);
addMock.setPath("testEndpoint" + endpointNumber);