diff options
author | Haakon Dybdahl <dybdahl@yahoo-inc.com> | 2017-01-24 15:12:11 +0100 |
---|---|---|
committer | Haakon Dybdahl <dybdahl@yahoo-inc.com> | 2017-01-24 15:12:11 +0100 |
commit | 4a2ea530434ae53885aa68377704021c30fa6d9a (patch) | |
tree | a0efb83323141fc11038ee310298e496c48c131e /vespaclient-container-plugin/src | |
parent | e3a03847d5a0cacfa9e2465040bd146abbe66f16 (diff) |
update test
Diffstat (limited to 'vespaclient-container-plugin/src')
3 files changed, 5 insertions, 3 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java index 95f0169cfd0..f6a6ed05e57 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java @@ -69,9 +69,11 @@ public class RestApi extends LoggingRequestHandler { public RestApi( Executor executor, AccessLog accessLog, - OperationHandler operationHandler) { + OperationHandler operationHandler, + int threadsAvailable) { super(executor, accessLog); this.operationHandler = operationHandler; + this.threadsAvailableForApi.set(threadsAvailable); } @Override diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiMaxThreadTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiMaxThreadTest.java index 17a36c142ea..d1eb32af48e 100644 --- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiMaxThreadTest.java +++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiMaxThreadTest.java @@ -20,7 +20,7 @@ public class RestApiMaxThreadTest { private class RestApiMocked extends RestApi { public RestApiMocked() { - super(mock(Executor.class), null, (OperationHandler)null); + super(mock(Executor.class), null, (OperationHandler)null, 20); } @Override diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiWithTestDocumentHandler.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiWithTestDocumentHandler.java index 1c0252704ea..138916f6979 100644 --- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiWithTestDocumentHandler.java +++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/RestApiWithTestDocumentHandler.java @@ -22,7 +22,7 @@ public class RestApiWithTestDocumentHandler extends RestApi{ Executor executor, AccessLog accessLog, OperationHandler operationHandler) { - super(executor, accessLog, operationHandler); + super(executor, accessLog, operationHandler, 20); DocumentType documentType = new DocumentType("testdocument"); |