Add params
Change-Id: I30d8d140a0ac01db9a5fbc184616fff487852109
This commit is contained in:
parent
159f0a4987
commit
229f2d02d3
1 changed files with 4 additions and 1 deletions
|
@ -21,6 +21,9 @@ import java.util.concurrent.TimeUnit;
|
||||||
public class MockserverTest {
|
public class MockserverTest {
|
||||||
HttpMockServer httpMockServer;
|
HttpMockServer httpMockServer;
|
||||||
|
|
||||||
|
@Param({"9000", "8000"})
|
||||||
|
int initialPort;
|
||||||
|
|
||||||
@Setup
|
@Setup
|
||||||
public void prepareMockServer(BenchmarkParams params) {
|
public void prepareMockServer(BenchmarkParams params) {
|
||||||
httpMockServer = new HttpMockServer(9999);
|
httpMockServer = new HttpMockServer(9999);
|
||||||
|
@ -54,7 +57,7 @@ public class MockserverTest {
|
||||||
public void shouldHandleManyRequestsSimultaneously(TestState testState, Blackhole bh) throws IOException {
|
public void shouldHandleManyRequestsSimultaneously(TestState testState, Blackhole bh) throws IOException {
|
||||||
int current = testState.current;
|
int current = testState.current;
|
||||||
int endpointNumber = current % 10;
|
int endpointNumber = current % 10;
|
||||||
int port = 9000 + (current % 7);
|
int port = initialPort + (current % 7);
|
||||||
AddMock addMock = new AddMock();
|
AddMock addMock = new AddMock();
|
||||||
addMock.setName("testRest" + current);
|
addMock.setName("testRest" + current);
|
||||||
addMock.setPath("testEndpoint" + endpointNumber);
|
addMock.setPath("testEndpoint" + endpointNumber);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue